]> TLD Linux GIT Repositories - packages/busybox.git/blob - x32.patch
- merged 1.31.1 from PLD
[packages/busybox.git] / x32.patch
1 --- busybox-1.22.1/include/libbb.h.orig 2015-01-26 19:38:58.762414035 +0000
2 +++ busybox-1.22.1/include/libbb.h      2015-01-26 19:39:20.749079926 +0000
3 @@ -232,6 +232,13 @@
4  #else
5  /* CONFIG_LFS is off */
6  # if UINT_MAX == 0xffffffff
7 +#ifdef __ILP32__
8 +typedef unsigned long long uoff_t;
9 +#  define XATOOFF(a) xatoull_range((a), 0, LLONG_MAX)
10 +#  define BB_STRTOOFF bb_strtoull
11 +#  define STRTOOFF strtoull
12 +#  define OFF_FMT "ll"
13 +#else
14  /* While sizeof(off_t) == sizeof(int), off_t is typedef'ed to long anyway.
15   * gcc will throw warnings on printf("%d", off_t). Crap... */
16  typedef unsigned long uoff_t;
17 @@ -239,6 +246,7 @@
18  #  define BB_STRTOOFF bb_strtou
19  #  define STRTOOFF strtol
20  #  define OFF_FMT "l"
21 +#endif
22  # else
23  typedef unsigned long uoff_t;
24  #  define XATOOFF(a) xatoul_range((a), 0, LONG_MAX)