about summary refs log tree commit homepage
path: root/http_get.c
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2014-02-17 16:49:57 -0500
committerEric Wong <e@80x24.org>2014-02-17 16:49:57 -0500
commit3d96736835c69b3de698bd3cc9ed12bab1da8d73 (patch)
treed39e47ac3b253c8bf7ef2460c50afaec016b63f3 /http_get.c
parent6eaf13539681dd1d6725021112dc43b69ae2be4d (diff)
downloadcmogstored-3d96736835c69b3de698bd3cc9ed12bab1da8d73.tar.gz
Non-Linux OSes may eventually gain a Linux-compatible sendfile.
Diffstat (limited to 'http_get.c')
-rw-r--r--http_get.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/http_get.c b/http_get.c
index acca0df..eb6c5a8 100644
--- a/http_get.c
+++ b/http_get.c
@@ -6,9 +6,10 @@
 #include "cmogstored.h"
 #include "http.h"
 #if defined(HAVE_SENDFILE)
-#  if defined(__linux__)
+#  ifdef HAVE_SYS_SENDFILE_H /* Linux */
 #    include <sys/sendfile.h>
-#  else
+#  endif
+#  ifndef __linux__
 /*
  * make BSD sendfile look like Linux for now...
  * we can support SF_NODISKIO later