summary refs log tree commit diff
path: root/hittpd.c
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2020-05-08 22:00:43 +0200
committerLeah Neukirchen <leah@vuxu.org>2020-05-08 22:00:43 +0200
commit0d5dd415c34acbe6e154f3b0140c5a98e2892f34 (patch)
tree608c6e864c6ab889244ffa05ec4eb9b997f5ae5d /hittpd.c
parentc724fd1ba192189f96ea8990f3792bd11a25cbd2 (diff)
downloadhittpd-0d5dd415c34acbe6e154f3b0140c5a98e2892f34.tar.gz
hittpd-0d5dd415c34acbe6e154f3b0140c5a98e2892f34.tar.xz
hittpd-0d5dd415c34acbe6e154f3b0140c5a98e2892f34.zip
simply enable sendfile on linux
Diffstat (limited to 'hittpd.c')
-rw-r--r--hittpd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hittpd.c b/hittpd.c
index e64cbff..abf793e 100644
--- a/hittpd.c
+++ b/hittpd.c
@@ -26,7 +26,7 @@
 #define _XOPEN_SOURCE 700
 #define _DEFAULT_SOURCE
 
-#ifdef USE_SENDFILE
+#ifdef __linux__
 #include <sys/sendfile.h>
 #endif
 #include <sys/socket.h>
@@ -791,7 +791,7 @@ write_client(int i)
 	ssize_t w = 0;
 
 	if (data->stream_fd >= 0) {
-#ifndef USE_SENDFILE
+#ifndef __linux__
 		char buf[16*4096];
 		size_t n = pread(data->stream_fd, buf, sizeof buf, data->off);
 		if (n < 0)