diff options
author | Chris Rees <utisoft@gmail.com> | 2011-01-24 17:07:06 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-01-24 17:07:06 +0100 |
commit | 330718ef5574d1f830e304107d2a43038aa6ff5c (patch) | |
tree | 77b8ae48bc39a25c54b16e60a45803af74ff5a83 | |
parent | e3c127d846eb2febbdb86bcf6c0c92622ab98eea (diff) | |
download | busybox-w32-330718ef5574d1f830e304107d2a43038aa6ff5c.tar.gz busybox-w32-330718ef5574d1f830e304107d2a43038aa6ff5c.tar.bz2 busybox-w32-330718ef5574d1f830e304107d2a43038aa6ff5c.zip |
FreeBSD compat
Signed-off-by: Chris Rees <utisoft@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | include/libbb.h | 15 | ||||
-rw-r--r-- | include/platform.h | 3 |
2 files changed, 12 insertions, 6 deletions
diff --git a/include/libbb.h b/include/libbb.h index aa7944a5d..e5988236d 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -38,12 +38,6 @@ | |||
38 | #include <time.h> | 38 | #include <time.h> |
39 | #include <unistd.h> | 39 | #include <unistd.h> |
40 | #include <sys/param.h> | 40 | #include <sys/param.h> |
41 | #ifndef HAVE_CLEARENV | ||
42 | # define clearenv() do { if (environ) environ[0] = NULL; } while (0) | ||
43 | #endif | ||
44 | #ifndef HAVE_FDATASYNC | ||
45 | # define fdatasync fsync | ||
46 | #endif | ||
47 | #ifdef HAVE_MNTENT_H | 41 | #ifdef HAVE_MNTENT_H |
48 | # include <mntent.h> | 42 | # include <mntent.h> |
49 | #endif | 43 | #endif |
@@ -103,6 +97,15 @@ | |||
103 | typedef unsigned socklen_t; | 97 | typedef unsigned socklen_t; |
104 | # endif | 98 | # endif |
105 | #endif | 99 | #endif |
100 | #ifndef HAVE_CLEARENV | ||
101 | # define clearenv() do { if (environ) environ[0] = NULL; } while (0) | ||
102 | #endif | ||
103 | #ifndef HAVE_FDATASYNC | ||
104 | # define fdatasync fsync | ||
105 | #endif | ||
106 | #ifndef HAVE_XTABS | ||
107 | # define XTABS TAB3 | ||
108 | #endif | ||
106 | 109 | ||
107 | 110 | ||
108 | /* Some libc's forget to declare these, do it ourself */ | 111 | /* Some libc's forget to declare these, do it ourself */ |
diff --git a/include/platform.h b/include/platform.h index 2bc88c391..9d6e21626 100644 --- a/include/platform.h +++ b/include/platform.h | |||
@@ -262,9 +262,12 @@ typedef uint32_t bb__aliased_uint32_t FIX_ALIASING; | |||
262 | # undef HAVE_PTSNAME_R | 262 | # undef HAVE_PTSNAME_R |
263 | # undef HAVE_SYS_STATFS_H | 263 | # undef HAVE_SYS_STATFS_H |
264 | # undef HAVE_SIGHANDLER_T | 264 | # undef HAVE_SIGHANDLER_T |
265 | # undef HAVE_XTABS | ||
266 | # undef HAVE_FDPRINTF | ||
265 | #else | 267 | #else |
266 | # define HAVE_MNTENT_H 1 | 268 | # define HAVE_MNTENT_H 1 |
267 | # define HAVE_SYS_STATFS_H 1 | 269 | # define HAVE_SYS_STATFS_H 1 |
270 | # define HAVE_XTABS 1 | ||
268 | #endif | 271 | #endif |
269 | 272 | ||
270 | /*----- Kernel versioning ------------------------------------*/ | 273 | /*----- Kernel versioning ------------------------------------*/ |