aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_posix_config.h
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2015-05-25 17:58:13 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2015-05-25 17:58:13 +0300
commit226647e39742ab4e154c3e2546f7300952c3ee3f (patch)
treeb307c1718eeeb0a0d6548080141c859ef63e983c /src/os/unix/ngx_posix_config.h
parentb4619182bb53d0c65790ce9b0f67e744111f0831 (diff)
downloadnginx-226647e39742ab4e154c3e2546f7300952c3ee3f.tar.gz
nginx-226647e39742ab4e154c3e2546f7300952c3ee3f.zip
Configure: GNU Hurd properly recognized.
With this change it's no longer needed to pass -D_GNU_SOURCE manually, and -D_FILE_OFFSET_BITS=64 is set to use 64-bit off_t. Note that nginx currently fails to work properly with master process enabled on GNU Hurd, as fcntl(F_SETOWN) returns EOPNOTSUPP for sockets as of GNU Hurd 0.6. Additionally, our strerror() preloading doesn't work well with GNU Hurd, as it uses large numbers for most errors.
Diffstat (limited to 'src/os/unix/ngx_posix_config.h')
-rw-r--r--src/os/unix/ngx_posix_config.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/os/unix/ngx_posix_config.h b/src/os/unix/ngx_posix_config.h
index d725659df..443c4b001 100644
--- a/src/os/unix/ngx_posix_config.h
+++ b/src/os/unix/ngx_posix_config.h
@@ -21,6 +21,14 @@
#endif
+#if (NGX_GNU_HURD)
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE /* accept4() */
+#endif
+#define _FILE_OFFSET_BITS 64
+#endif
+
+
#ifdef __CYGWIN__
#define timezonevar /* timezone is variable */
#define NGX_BROKEN_SCM_RIGHTS 1