1 check if __GLIBC__ is defined before using _FILE_OFFSET_BITS
3 _FILE_OFFSET_BITS is a glibc internal macro.
4 musl provides 64bit off_t by default, but
5 defines stat64 etc as macros to make glibc-centric
6 programs happy. however the expansion causes
7 problems with the hack used here to work around
10 --- kmod-15.org/testsuite/path.c 2013-08-26 16:03:22.239000003 +0000
11 +++ kmod-15/testsuite/path.c 2013-08-26 16:11:36.939000003 +0000
13 WRAP_2ARGS(int, -1, access, int);
14 WRAP_2ARGS(int, -1, stat, struct stat*);
15 WRAP_2ARGS(int, -1, lstat, struct stat*);
16 -#ifndef _FILE_OFFSET_BITS
17 +#if defined(__GLIBC__) && !defined(_FILE_OFFSET_BITS)
18 WRAP_2ARGS(int, -1, stat64, struct stat64*);
19 WRAP_2ARGS(int, -1, lstat64, struct stat64*);
25 -#ifndef _FILE_OFFSET_BITS
26 +#if defined(__GLIBC__) && !defined(_FILE_OFFSET_BITS)
28 WRAP_VERSTAT(__lx,64);