aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_linux_config.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/unix/ngx_linux_config.h')
-rw-r--r--src/os/unix/ngx_linux_config.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/os/unix/ngx_linux_config.h b/src/os/unix/ngx_linux_config.h
index 59e1b0976..0ec0532f3 100644
--- a/src/os/unix/ngx_linux_config.h
+++ b/src/os/unix/ngx_linux_config.h
@@ -4,10 +4,8 @@
#define _GNU_SOURCE /* pread(), pwrite(), gethostname() */
-#if 0
#define _FILE_OFFSET_BITS 64
#define _LARGEFILE_SOURCE
-#endif
#include <unistd.h>
@@ -28,7 +26,13 @@
#include <sys/sysctl.h>
#include <sys/wait.h>
#include <sys/socket.h>
+
+#if (HAVE_SENDFILE64)
#include <sys/sendfile.h>
+#else
+extern ssize_t sendfile(int s, int fd, int32_t *offset, size_t size);
+#endif
+
#include <netinet/in.h>
#include <netinet/tcp.h> /* TCP_CORK */
#include <arpa/inet.h>
@@ -37,15 +41,6 @@
-#if 0
-#define SIZE_FMT "%d"
-#define SIZEX_FMT "%x"
-#define PID_FMT "%d"
-#define RLIM_FMT "%lu"
-#endif
-
-
-
#ifndef HAVE_SELECT
#define HAVE_SELECT 1
#endif