diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-02-07 22:41:33 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2008-02-07 22:41:33 +0000 |
commit | 9412ec755543a1ddd5f4b39e1fe5a5dd319fa06c (patch) | |
tree | 850e90d64948a6c73dabeb95b903c0d6eb701319 /include/platform.h | |
parent | 22876c797cdd848b42f98da7c2ae886cc07ca00d (diff) | |
download | busybox-w32-9412ec755543a1ddd5f4b39e1fe5a5dd319fa06c.tar.gz busybox-w32-9412ec755543a1ddd5f4b39e1fe5a5dd319fa06c.tar.bz2 busybox-w32-9412ec755543a1ddd5f4b39e1fe5a5dd319fa06c.zip |
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/platform.h')
-rw-r--r-- | include/platform.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/platform.h b/include/platform.h index 050338cf3..9acba63e0 100644 --- a/include/platform.h +++ b/include/platform.h | |||
@@ -137,19 +137,20 @@ | |||
137 | /* ---- Networking ------------------------------------------ */ | 137 | /* ---- Networking ------------------------------------------ */ |
138 | #ifndef __APPLE__ | 138 | #ifndef __APPLE__ |
139 | # include <arpa/inet.h> | 139 | # include <arpa/inet.h> |
140 | # ifndef __socklen_t_defined | ||
141 | typedef int socklen_t; | ||
142 | # endif | ||
140 | #else | 143 | #else |
141 | # include <netinet/in.h> | 144 | # include <netinet/in.h> |
142 | #endif | 145 | #endif |
143 | 146 | ||
144 | #ifndef __socklen_t_defined | ||
145 | typedef int socklen_t; | ||
146 | #endif | ||
147 | |||
148 | /* ---- Compiler dependent settings ------------------------- */ | 147 | /* ---- Compiler dependent settings ------------------------- */ |
149 | #if (defined __digital__ && defined __unix__) || defined __APPLE__ | 148 | #if (defined __digital__ && defined __unix__) || defined __APPLE__ |
150 | # undef HAVE_MNTENT_H | 149 | # undef HAVE_MNTENT_H |
150 | # undef HAVE_SYS_STATFS_H | ||
151 | #else | 151 | #else |
152 | # define HAVE_MNTENT_H 1 | 152 | # define HAVE_MNTENT_H 1 |
153 | # define HAVE_SYS_STATFS_H 1 | ||
153 | #endif /* ___digital__ && __unix__ */ | 154 | #endif /* ___digital__ && __unix__ */ |
154 | 155 | ||
155 | /* linux/loop.h relies on __u64. Make sure we have that as a proper type | 156 | /* linux/loop.h relies on __u64. Make sure we have that as a proper type |
@@ -180,7 +181,7 @@ __extension__ typedef unsigned long long __u64; | |||
180 | #define HAVE_FEATURES_H | 181 | #define HAVE_FEATURES_H |
181 | #include <stdint.h> | 182 | #include <stdint.h> |
182 | #define HAVE_STDINT_H | 183 | #define HAVE_STDINT_H |
183 | #else | 184 | #elif !defined __APPLE__ |
184 | /* Largest integral types. */ | 185 | /* Largest integral types. */ |
185 | #if __BIG_ENDIAN__ | 186 | #if __BIG_ENDIAN__ |
186 | typedef long intmax_t; | 187 | typedef long intmax_t; |