From 330718ef5574d1f830e304107d2a43038aa6ff5c Mon Sep 17 00:00:00 2001 From: Chris Rees Date: Mon, 24 Jan 2011 17:07:06 +0100 Subject: FreeBSD compat Signed-off-by: Chris Rees Signed-off-by: Denys Vlasenko --- include/libbb.h | 15 +++++++++------ 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 @@ #include #include #include -#ifndef HAVE_CLEARENV -# define clearenv() do { if (environ) environ[0] = NULL; } while (0) -#endif -#ifndef HAVE_FDATASYNC -# define fdatasync fsync -#endif #ifdef HAVE_MNTENT_H # include #endif @@ -103,6 +97,15 @@ typedef unsigned socklen_t; # endif #endif +#ifndef HAVE_CLEARENV +# define clearenv() do { if (environ) environ[0] = NULL; } while (0) +#endif +#ifndef HAVE_FDATASYNC +# define fdatasync fsync +#endif +#ifndef HAVE_XTABS +# define XTABS TAB3 +#endif /* 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; # undef HAVE_PTSNAME_R # undef HAVE_SYS_STATFS_H # undef HAVE_SIGHANDLER_T +# undef HAVE_XTABS +# undef HAVE_FDPRINTF #else # define HAVE_MNTENT_H 1 # define HAVE_SYS_STATFS_H 1 +# define HAVE_XTABS 1 #endif /*----- Kernel versioning ------------------------------------*/ -- cgit v1.2.3