svn commit: trunk/busybox/include
vapier at busybox.net
vapier at busybox.net
Thu Feb 7 22:41:34 UTC 2008
Author: vapier
Date: 2008-02-07 14:41:33 -0800 (Thu, 07 Feb 2008)
New Revision: 20956
Log:
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
Modified:
trunk/busybox/include/libbb.h
trunk/busybox/include/platform.h
Changeset:
Modified: trunk/busybox/include/libbb.h
===================================================================
--- trunk/busybox/include/libbb.h 2008-02-07 22:10:07 UTC (rev 20955)
+++ trunk/busybox/include/libbb.h 2008-02-07 22:41:33 UTC (rev 20956)
@@ -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 @@
| 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_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);
Modified: trunk/busybox/include/platform.h
===================================================================
--- trunk/busybox/include/platform.h 2008-02-07 22:10:07 UTC (rev 20955)
+++ trunk/busybox/include/platform.h 2008-02-07 22:41:33 UTC (rev 20956)
@@ -137,19 +137,20 @@
/* ---- Networking ------------------------------------------ */
#ifndef __APPLE__
# include <arpa/inet.h>
+# ifndef __socklen_t_defined
+typedef int socklen_t;
+# endif
#else
# include <netinet/in.h>
#endif
-#ifndef __socklen_t_defined
-typedef int socklen_t;
-#endif
-
/* ---- Compiler dependent settings ------------------------- */
#if (defined __digital__ && defined __unix__) || defined __APPLE__
# undef HAVE_MNTENT_H
+# undef HAVE_SYS_STATFS_H
#else
# define HAVE_MNTENT_H 1
+# define HAVE_SYS_STATFS_H 1
#endif /* ___digital__ && __unix__ */
/* linux/loop.h relies on __u64. Make sure we have that as a proper type
@@ -180,7 +181,7 @@
#define HAVE_FEATURES_H
#include <stdint.h>
#define HAVE_STDINT_H
-#else
+#elif !defined __APPLE__
/* Largest integral types. */
#if __BIG_ENDIAN__
typedef long intmax_t;
More information about the busybox-cvs
mailing list