aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2012-07-02 17:22:31 +0000
committerMaxim Dounin <mdounin@mdounin.ru>2012-07-02 17:22:31 +0000
commit37cf05e2af4d5a4a6c5a437e12bae738fb00963f (patch)
tree06d0b15509a25278b4a4bde176db7c19e408be8c
parenta6633971fbedea1e0ae1df2dfbaa7bbce7d500da (diff)
downloadnginx-37cf05e2af4d5a4a6c5a437e12bae738fb00963f.tar.gz
nginx-37cf05e2af4d5a4a6c5a437e12bae738fb00963f.zip
Merge of r4693: fixed "sendmsg() failed" alerts on HP-UX.
HP-UX needs _HPUX_ALT_XOPEN_SOCKET_API to be defined to be able to use various POSIX versions of networking functions. Notably sendmsg() resulted in "sendmsg() failed (9: Bad file number)" alerts without it. See xopen_networking(7) for more details.
-rw-r--r--auto/os/conf1
-rw-r--r--src/os/unix/ngx_posix_config.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/auto/os/conf b/auto/os/conf
index 5e658b5f3..fe720160a 100644
--- a/auto/os/conf
+++ b/auto/os/conf
@@ -48,6 +48,7 @@ case "$NGX_PLATFORM" in
CORE_DEPS="$UNIX_DEPS $POSIX_DEPS"
CORE_SRCS="$UNIX_SRCS"
CC_AUX_FLAGS="$CC_AUX_FLAGS -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
+ CC_AUX_FLAGS="$CC_AUX_FLAGS -D_HPUX_ALT_XOPEN_SOCKET_API"
;;
OSF1:*)
diff --git a/src/os/unix/ngx_posix_config.h b/src/os/unix/ngx_posix_config.h
index 4d432a7e3..4cf90cc98 100644
--- a/src/os/unix/ngx_posix_config.h
+++ b/src/os/unix/ngx_posix_config.h
@@ -12,6 +12,7 @@
#if (NGX_HPUX)
#define _XOPEN_SOURCE
#define _XOPEN_SOURCE_EXTENDED 1
+#define _HPUX_ALT_XOPEN_SOCKET_API
#endif