qi: remove adding the depends.order into the meta file
[dragora.git] / patches / kmod / kmod-test-glibc-assumption.patch
blob323426428991146bc9caeaf0b9ae4681afdc730f
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
8 glibc's 32bit past...
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
12 @@ -185,7 +185,7 @@
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*);
20 WRAP_OPEN(64);
21 @@ -196,7 +196,7 @@
22 #ifdef HAVE___XSTAT
23 WRAP_VERSTAT(__x,);
24 WRAP_VERSTAT(__lx,);
25 -#ifndef _FILE_OFFSET_BITS
26 +#if defined(__GLIBC__) && !defined(_FILE_OFFSET_BITS)
27 WRAP_VERSTAT(__x,64);
28 WRAP_VERSTAT(__lx,64);
29 #endif