diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | hittpd.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile index fbe0a26..f2a101e 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ ALL=hittpd OBJ=hittpd.o http-parser/http_parser.o CFLAGS=-g -O2 -Wall -Wno-switch -Wextra -Wwrite-strings -CPPFLAGS=-DUSE_SENDFILE -Ihttp-parser +CPPFLAGS=-Ihttp-parser DESTDIR= PREFIX=/usr/local 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) |