diff options
author | Vladimir Mezentsev <vladimir.mezentsev@oracle.com> | 2023-02-16 19:00:47 -0800 |
---|---|---|
committer | Vladimir Mezentsev <vladimir.mezentsev@oracle.com> | 2023-02-17 14:00:54 -0800 |
commit | f6f19a39ecfe962cb8a05522c27f513308687a74 (patch) | |
tree | e483557678f9c0250ec9e1009e6bcbfbed51836a /gprofng | |
parent | 7a2a5ff865bead782393897fc5fde47def30dad4 (diff) | |
download | gdb-f6f19a39ecfe962cb8a05522c27f513308687a74.zip gdb-f6f19a39ecfe962cb8a05522c27f513308687a74.tar.gz gdb-f6f19a39ecfe962cb8a05522c27f513308687a74.tar.bz2 |
gprofng: PR30036 Build failure on aarch64 w/ glibc: symbol `pwrite64' is already defined
gprofng/ChangeLog
2023-02-16 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
PR gprofng/30036
* libcollector/iotrace.c: Define creat64 and pwrite64 only when
__USE_LARGEFILE64 and __USE_FILE_OFFSET64 are not defined.
* libcollector/mmaptrace.c: Likewise for mmap64.
Diffstat (limited to 'gprofng')
-rw-r--r-- | gprofng/libcollector/iotrace.c | 15 | ||||
-rw-r--r-- | gprofng/libcollector/mmaptrace.c | 2 |
2 files changed, 9 insertions, 8 deletions
diff --git a/gprofng/libcollector/iotrace.c b/gprofng/libcollector/iotrace.c index af90cc3..d8439b0 100644 --- a/gprofng/libcollector/iotrace.c +++ b/gprofng/libcollector/iotrace.c @@ -1441,7 +1441,7 @@ creat (const char *path, mode_t mode) } /*------------------------------------------------------------- creat64 */ -#if WSIZE(32) +#if WSIZE(32) && !defined(__USE_LARGEFILE64) int creat64 (const char *path, mode_t mode) { @@ -2476,7 +2476,7 @@ __collector_pwrite_2_1 (int fildes, const void *buf, size_t nbyte, off_t offset) return ret; } -#else +#endif ssize_t pwrite (int fildes, const void *buf, size_t nbyte, off_t offset) { @@ -2497,11 +2497,10 @@ pwrite (int fildes, const void *buf, size_t nbyte, off_t offset) POP_REENTRANCE (guard); return ret; } -#endif /*------------------------------------------------------------- pwrite64 */ -#if WSIZE(32) -#if !defined(__MUSL_LIBC) && ARCH(Intel) +#if WSIZE(32) && ARCH(Intel) +#if !defined(__MUSL_LIBC) // map interposed symbol versions SYMVER_ATTRIBUTE (__collector_pwrite64_2_2, pwrite64@GLIBC_2.2) @@ -2547,8 +2546,9 @@ __collector_pwrite64_2_1 (int fildes, const void *buf, size_t nbyte, off64_t off POP_REENTRANCE (guard); return ret; } +#endif -#else +#if !defined(__USE_FILE_OFFSET64) ssize_t pwrite64 (int fildes, const void *buf, size_t nbyte, off64_t offset) { @@ -2570,7 +2570,8 @@ pwrite64 (int fildes, const void *buf, size_t nbyte, off64_t offset) return ret; } #endif -#endif /* SIZE(32) */ + +#endif /* SIZE(32) && ARCH(Intel) */ /*------------------------------------------------------------- fgets */ char* diff --git a/gprofng/libcollector/mmaptrace.c b/gprofng/libcollector/mmaptrace.c index 61613c2..221b4e2 100644 --- a/gprofng/libcollector/mmaptrace.c +++ b/gprofng/libcollector/mmaptrace.c @@ -1494,7 +1494,7 @@ mmap (void *start, size_t length, int prot, int flags, int fd, off_t offset) } /*------------------------------------------------------------- mmap64 */ -#if WSIZE(32) /* mmap64 only defined for non-64-bit */ +#if WSIZE(32) && !defined(__USE_FILE_OFFSET64) void * mmap64 (void *start, size_t length, int prot, int flags, int fd, off64_t offset) |