diff options
Diffstat (limited to 'main')
| -rw-r--r-- | main/fopen_wrappers.c | 2 | ||||
| -rw-r--r-- | main/network.c | 2 | ||||
| -rw-r--r-- | main/php_open_temporary_file.c | 6 |
3 files changed, 10 insertions, 0 deletions
diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index ec8a623021..19c6e287fb 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -66,8 +66,10 @@ #else #include <netinet/in.h> #include <netdb.h> +#if HAVE_ARPA_INET_H #include <arpa/inet.h> #endif +#endif #ifdef PHP_WIN32 #undef AF_UNIX diff --git a/main/network.c b/main/network.c index e5754f9378..8b614e54ed 100644 --- a/main/network.c +++ b/main/network.c @@ -36,7 +36,9 @@ #ifndef PHP_WIN32 #include <netinet/in.h> #include <netdb.h> +#if HAVE_ARPA_INET_H #include <arpa/inet.h> +#endif #else int inet_aton(const char *, struct in_addr *); #endif diff --git a/main/php_open_temporary_file.c b/main/php_open_temporary_file.c index 64f9cd8c9b..f4ff9f8271 100644 --- a/main/php_open_temporary_file.c +++ b/main/php_open_temporary_file.c @@ -34,8 +34,10 @@ #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> +#if HAVE_ARPA_INET_H #include <arpa/inet.h> #endif +#endif #ifdef HAVE_SYS_TIME_H #include <sys/time.h> #endif @@ -44,6 +46,10 @@ #include <sys/file.h> #endif +#if !defined(P_tmpdir) +#define P_tmpdir "" +#endif + /* {{{ php_open_temporary_file */ /* Loosely based on a tempnam() implementation by UCLA */ |
