summaryrefslogtreecommitdiff
path: root/include/libbb.h
diff options
context:
space:
mode:
authorMike Frysinger2008-02-07 22:41:33 +0000
committerMike Frysinger2008-02-07 22:41:33 +0000
commit9412ec755543a1ddd5f4b39e1fe5a5dd319fa06c (patch)
tree850e90d64948a6c73dabeb95b903c0d6eb701319 /include/libbb.h
parent22876c797cdd848b42f98da7c2ae886cc07ca00d (diff)
downloadbusybox-9412ec755543a1ddd5f4b39e1fe5a5dd319fa06c.zip
busybox-9412ec755543a1ddd5f4b39e1fe5a5dd319fa06c.tar.gz
some more fixes for cross-compiling on an OS X host: apple provides core types so dont redefine them, sys/statfs.h is not available, and only use some newer AF_* defines if they are actually available
Diffstat (limited to 'include/libbb.h')
-rw-r--r--include/libbb.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/libbb.h b/include/libbb.h
index ccfe1b7..3ef03d6 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -30,7 +30,6 @@
#include <sys/mman.h>
#include <sys/socket.h>
#include <sys/stat.h>
-#include <sys/statfs.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/wait.h>
@@ -49,6 +48,10 @@
#include <mntent.h>
#endif
+#ifdef HAVE_SYS_STATFS_H
+#include <sys/statfs.h>
+#endif
+
#if ENABLE_SELINUX
#include <selinux/selinux.h>
#include <selinux/context.h>
@@ -311,8 +314,12 @@ struct BUG_too_small {
| AF_INET
| AF_INET6
| AF_UNIX
+#ifdef AF_PACKET
| AF_PACKET
+#endif
+#ifdef AF_NETLINK
| AF_NETLINK
+#endif
/* | AF_DECnet */
/* | AF_IPX */
) <= 127 ? 1 : -1];
@@ -807,8 +814,10 @@ extern void run_applet_and_exit(const char *name, char **argv);
extern void run_applet_no_and_exit(int a, char **argv) ATTRIBUTE_NORETURN;
#endif
+#ifdef HAVE_MNTENT_H
extern int match_fstype(const struct mntent *mt, const char *fstypes);
extern struct mntent *find_mount_point(const char *name, const char *table);
+#endif
extern void erase_mtab(const char * name);
extern unsigned int tty_baud_to_value(speed_t speed);
extern speed_t tty_value_to_baud(unsigned int value);