FreeBSD compat
authorChris Rees <utisoft@gmail.com>
Mon, 24 Jan 2011 16:07:06 +0000 (17:07 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 24 Jan 2011 16:07:06 +0000 (17:07 +0100)
Signed-off-by: Chris Rees <utisoft@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
include/libbb.h
include/platform.h

index aa7944a5d6cc7c459d6f35066d732243e145667a..e5988236db750cf0abd6d01fb412d57797d85199 100644 (file)
 #include <time.h>
 #include <unistd.h>
 #include <sys/param.h>
-#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 <mntent.h>
 #endif
    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 */
index 2bc88c391a9904f7c1e46de4e386f0d09fdccfb7..9d6e216264f98e8ccff837a5adaa179923444041 100644 (file)
@@ -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 ------------------------------------*/