public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
From: Vladimir Mezentsev <vmezents@sourceware.org>
To: bfd-cvs@sourceware.org, gdb-cvs@sourceware.org
Subject: [binutils-gdb] gprofng: Fix build with 64bit file offset on 32bit machines
Date: Wed,  2 Aug 2023 04:01:50 +0000 (GMT)	[thread overview]
Message-ID: <20230802040150.34C783858D39@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=69c37f53e20dc3e0b3c179b511ff786db6ae114e

commit 69c37f53e20dc3e0b3c179b511ff786db6ae114e
Author: Khem Raj <raj.khem@gmail.com>
Date:   Mon Jul 31 15:31:40 2023 -0700

    gprofng: Fix build with 64bit file offset on 32bit machines
    
    gprofng/ChangeLog
    2023-07-31  Khem Raj <raj.khem@gmail.com>
    
    * libcollector/iotrace.c: Define open64, fgetpos64, and fsetpos64
      only when __USE_LARGEFILE64 and __USE_FILE_OFFSET64 are not
      defined.

Diff:
---
 gprofng/libcollector/iotrace.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/gprofng/libcollector/iotrace.c b/gprofng/libcollector/iotrace.c
index c0ea7497b09..81c844048d9 100644
--- a/gprofng/libcollector/iotrace.c
+++ b/gprofng/libcollector/iotrace.c
@@ -1030,8 +1030,9 @@ gprofng_open64 (int(real_open64) (const char *, int, ...),
   }
 
 DCL_FUNC_VER (DCL_OPEN64, open64_2_2, open64@GLIBC_2.2)
+#if !defined(__USE_LARGEFILE64)
 DCL_OPEN64 (open64)
-
+#endif
 
 #define F_ERROR_ARG     0
 #define F_INT_ARG       1
@@ -2989,8 +2990,9 @@ DCL_FUNC_VER (DCL_FGETPOS64, fgetpos64_2_17, fgetpos64@GLIBC_2.17)
 DCL_FUNC_VER (DCL_FGETPOS64, fgetpos64_2_2_5, fgetpos64@GLIBC_2.2.5)
 DCL_FUNC_VER (DCL_FGETPOS64, fgetpos64_2_2, fgetpos64@GLIBC_2.2)
 DCL_FUNC_VER (DCL_FGETPOS64, fgetpos64_2_1, fgetpos64@GLIBC_2.1)
+#if !defined(__USE_LARGEFILE64)
 DCL_FGETPOS64 (fgetpos64)
-
+#endif
 /*------------------------------------------------------------- fsetpos */
 static int
 gprofng_fsetpos (int(real_fsetpos) (FILE *, const fpos_t *),
@@ -3087,8 +3089,9 @@ DCL_FUNC_VER (DCL_FSETPOS64, fsetpos64_2_17, fsetpos64@GLIBC_2.17)
 DCL_FUNC_VER (DCL_FSETPOS64, fsetpos64_2_2_5, fsetpos64@GLIBC_2.2.5)
 DCL_FUNC_VER (DCL_FSETPOS64, fsetpos64_2_2, fsetpos64@GLIBC_2.2)
 DCL_FUNC_VER (DCL_FSETPOS64, fsetpos64_2_1, fsetpos64@GLIBC_2.1)
+#if !defined(__USE_LARGEFILE64)
 DCL_FSETPOS64 (fsetpos64)
-
+#endif
 /*------------------------------------------------------------- fsync */
 int
 fsync (int fildes)

                 reply	other threads:[~2023-08-02  4:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230802040150.34C783858D39@sourceware.org \
    --to=vmezents@sourceware.org \
    --cc=bfd-cvs@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).