Skip to content

Commit 318a3aa

Browse files
committed
Re-enable _LARGEFILE64_SOURCE when _GNU_SOURCE is defined
When we updated to the latest version of musl it broke some codebases that were using LFS functions (e.g. `stat64`) and assuming those functions would be defined when `_GNU_SOURCE` is defined. See bminor/musl@25e6fee This change effectively reverts the above one by defining _LARGEFILE64_SOURCE whenever _GNU_SOURCE is defined. This is what glibc does: https://github.com/lattera/glibc/blob/895ef79e04a953cac1493863bcae29ad85657ee1/include/features.h#L206
1 parent f433bc3 commit 318a3aa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

system/lib/libc/musl/include/features.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
#define _XOPEN_SOURCE 700
1717
#endif
1818

19+
#if defined(_GNU_SOURCE)
20+
#undef _LARGEFILE64_SOURCE
21+
#define _LARGEFILE64_SOURCE 1
22+
#endif
23+
1924
#if __STDC_VERSION__ >= 199901L
2025
#define __restrict restrict
2126
#elif !defined(__GNUC__)

0 commit comments

Comments
 (0)