large-file-64-source.patch (3324B)
1 diff --git a/dlink.c b/dlink.c 2 index 3463367..cdbfd57 100644 3 --- a/dlink.c 4 +++ b/dlink.c 5 @@ -2,6 +2,15 @@ 6 /* doubly linked lists */ 7 /* This is free software. No strings attached. No copyright claimed */ 8 9 +#ifndef _GNU_SOURCE 10 +#define _GNU_SOURCE 11 +#endif 12 +#ifndef _FILE_OFFSET_BITS 13 +#define _FILE_OFFSET_BITS 64 14 +#endif 15 +#ifndef _LARGEFILE64_SOURCE 16 +#define _LARGEFILE64_SOURCE 17 +#endif 18 #include <unistd.h> 19 #include <stdlib.h> 20 #include <string.h> 21 diff --git a/mdadm.h b/mdadm.h 22 index ebb2ca1..8f3e438 100644 23 --- a/mdadm.h 24 +++ b/mdadm.h 25 @@ -22,8 +22,15 @@ 26 * Email: <neilb@suse.de> 27 */ 28 29 -#define _GNU_SOURCE 30 +#ifndef _GNU_SOURCE 31 +#define _GNU_SOURCE 32 +#endif 33 +#ifndef _FILE_OFFSET_BITS 34 #define _FILE_OFFSET_BITS 64 35 +#endif 36 +#ifndef _LARGEFILE64_SOURCE 37 +#define _LARGEFILE64_SOURCE 38 +#endif 39 #include <unistd.h> 40 #ifdef __GLIBC__ 41 extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence)); 42 diff --git a/mdmon.c b/mdmon.c 43 index a16647c..cf3dfa2 100644 44 --- a/mdmon.c 45 +++ b/mdmon.c 46 @@ -42,6 +42,12 @@ 47 #ifndef _GNU_SOURCE 48 #define _GNU_SOURCE 49 #endif 50 +#ifndef _FILE_OFFSET_BITS 51 +#define _FILE_OFFSET_BITS 64 52 +#endif 53 +#ifndef _LARGEFILE64_SOURCE 54 +#define _LARGEFILE64_SOURCE 55 +#endif 56 57 #include <unistd.h> 58 #include <stdlib.h> 59 diff --git a/msg.c b/msg.c 60 index 0cc7fc5..59de5cc 100644 61 --- a/msg.c 62 +++ b/msg.c 63 @@ -19,6 +19,12 @@ 64 #ifndef _GNU_SOURCE 65 #define _GNU_SOURCE 66 #endif 67 +#ifndef _FILE_OFFSET_BITS 68 +#define _FILE_OFFSET_BITS 64 69 +#endif 70 +#ifndef _LARGEFILE64_SOURCE 71 +#define _LARGEFILE64_SOURCE 72 +#endif 73 #include <unistd.h> 74 #include <stdio.h> 75 #include <string.h> 76 diff --git a/platform-intel.c b/platform-intel.c 77 index 95bc492..03811fc 100644 78 --- a/platform-intel.c 79 +++ b/platform-intel.c 80 @@ -16,6 +16,15 @@ 81 * this program; if not, write to the Free Software Foundation, Inc., 82 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. 83 */ 84 +#ifndef _GNU_SOURCE 85 +#define _GNU_SOURCE 86 +#endif 87 +#ifndef _FILE_OFFSET_BITS 88 +#define _FILE_OFFSET_BITS 64 89 +#endif 90 +#ifndef _LARGEFILE64_SOURCE 91 +#define _LARGEFILE64_SOURCE 92 +#endif 93 #include "mdadm.h" 94 #include "platform-intel.h" 95 #include "probe_roms.h" 96 diff --git a/probe_roms.c b/probe_roms.c 97 index 94c80c2..2dbfa87 100644 98 --- a/probe_roms.c 99 +++ b/probe_roms.c 100 @@ -19,6 +19,15 @@ 101 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. 102 */ 103 104 +#ifndef _GNU_SOURCE 105 +#define _GNU_SOURCE 106 +#endif 107 +#ifndef _FILE_OFFSET_BITS 108 +#define _FILE_OFFSET_BITS 64 109 +#endif 110 +#ifndef _LARGEFILE64_SOURCE 111 +#define _LARGEFILE64_SOURCE 112 +#endif 113 #include "probe_roms.h" 114 #include "mdadm.h" 115 #include <unistd.h> 116 diff --git a/swap_super.c b/swap_super.c 117 index b6db574..92bba9b 100644 118 --- a/swap_super.c 119 +++ b/swap_super.c 120 @@ -1,3 +1,12 @@ 121 +#ifndef _GNU_SOURCE 122 +#define _GNU_SOURCE 123 +#endif 124 +#ifndef _FILE_OFFSET_BITS 125 +#define _FILE_OFFSET_BITS 64 126 +#endif 127 +#ifndef _LARGEFILE64_SOURCE 128 +#define _LARGEFILE64_SOURCE 129 +#endif 130 #include <unistd.h> 131 #include <stdlib.h> 132 #include <fcntl.h> 133 diff --git a/xmalloc.c b/xmalloc.c 134 index e28d3bd..deadc4e 100644 135 --- a/xmalloc.c 136 +++ b/xmalloc.c 137 @@ -21,6 +21,15 @@ 138 * Email: <neilb@suse.de> 139 */ 140 141 +#ifndef _GNU_SOURCE 142 +#define _GNU_SOURCE 143 +#endif 144 +#ifndef _FILE_OFFSET_BITS 145 +#define _FILE_OFFSET_BITS 64 146 +#endif 147 +#ifndef _LARGEFILE64_SOURCE 148 +#define _LARGEFILE64_SOURCE 149 +#endif 150 #include "xmalloc.h" 151 #include "mdadm_status.h" 152