diff options
author | Elliott Hughes <enh@google.com> | 2020-11-05 11:55:34 -0800 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2020-11-06 01:03:42 -0600 |
commit | 90c4e155dd0acf79f4f725c9dcd985304824c156 (patch) | |
tree | 64980d4e2a3130921a369b50c2f8f3d9ffb6af56 | |
parent | aed6c26fe4792e19f8ad99bef058f690fc2deecf (diff) | |
download | toybox-90c4e155dd0acf79f4f725c9dcd985304824c156.tar.gz |
portability.h: ensure _FILE_OFFSET_BITS=64 takes effect.
I added a #include above this, which caused subtle breakages on 32-bit
systems. Move it to the top of the file to fix it and avoid making a
similar mistake in future.
-rw-r--r-- | lib/portability.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/portability.h b/lib/portability.h index 05a449ee..5886f63f 100644 --- a/lib/portability.h +++ b/lib/portability.h @@ -4,6 +4,10 @@ // in specific compiler, library, or OS versions, localize all that here // and in portability.c +// Always use long file support. +// This must come before we #include any system header file to take effect! +#define _FILE_OFFSET_BITS 64 + // For musl #define _ALL_SOURCE #include <regex.h> @@ -30,9 +34,6 @@ #define printf_format #endif -// Always use long file support. -#define _FILE_OFFSET_BITS 64 - // This isn't in the spec, but it's how we determine what libc we're using. // Types various replacement prototypes need. |