wok view busybox/stuff/busybox-1.21-musl.u @ rev 15390

Up slitaz-boot-scripts (5.3.2)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Oct 30 18:29:11 2013 +0100 (2013-10-30)
parents
children
line source
1 --- busybox-1.21.0/include/platform.h
2 +++ busybox-1.21.0/include/platform.h
3 @@ -453,6 +453,13 @@
4 # undef HAVE_NET_ETHERNET_H
5 #endif
7 +#if defined(__musl__)
8 +# undef HAVE_SETBIT
9 +# include <stddef.h>
10 +# include <termios.h>
11 +# include <sys/ioctl.h>
12 +#endif
13 +
14 /*
15 * Now, define prototypes for all the functions defined in platform.c
16 * These must come after all the HAVE_* macros are defined (or not)
17 --- busybox-1.21.0/include/libbb.h
18 +++ busybox-1.21.0/include/libbb.h
19 @@ -210,6 +210,13 @@
20 * (in today's world - signed 64bit). For full support of large files,
21 * we need a few helper #defines (below) and careful use of off_t
22 * instead of int/ssize_t. No lseek64(), O_LARGEFILE etc necessary */
23 +#if defined(__musl__)
24 +typedef unsigned long long uoff_t;
25 +# define XATOOFF(a) xatoull_range((a), 0, LLONG_MAX)
26 +# define BB_STRTOOFF bb_strtoull
27 +# define STRTOOFF strtoull
28 +# define OFF_FMT "ll"
29 +#else
30 #if ENABLE_LFS
31 /* CONFIG_LFS is on */
32 # if ULONG_MAX > 0xffffffff
33 @@ -246,6 +253,7 @@
34 # define STRTOOFF strtol
35 # define OFF_FMT "l"
36 # endif
37 +#endif
38 #endif
39 /* scary. better ideas? (but do *test* them first!) */
40 #define OFF_T_MAX ((off_t)~((off_t)1 << (sizeof(off_t)*8-1)))