summaryrefslogtreecommitdiff
path: root/src/config.h
diff options
context:
space:
mode:
authorShooterIT <wangyuancode@163.com>2020-04-14 23:56:34 +0800
committerShooterIT <wangyuancode@163.com>2020-04-14 23:56:34 +0800
commit9cf500a3f67e4e2ce51414c354e3472faf095d5b (patch)
treebbb2b6f9fdd91ffaed655fe0e7a28e8275eede00 /src/config.h
parent7428f5121755f0f49aaf5f46321da64cd122aa1a (diff)
downloadredis-9cf500a3f67e4e2ce51414c354e3472faf095d5b.tar.gz
Implements sendfile for redis.
Diffstat (limited to 'src/config.h')
-rw-r--r--src/config.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h
index efa9d11f2..058d73932 100644
--- a/src/config.h
+++ b/src/config.h
@@ -133,6 +133,12 @@ void setproctitle(const char *fmt, ...);
/* Byte ordering detection */
#include <sys/types.h> /* This will likely define BYTE_ORDER */
+/* Define redis_sendfile. */
+#if defined(__linux__) || (defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_5))
+#define HAVE_SENDFILE 1
+ssize_t redis_sendfile(int out_fd, int in_fd, off_t offset, size_t count);
+#endif
+
#ifndef BYTE_ORDER
#if (BSD >= 199103)
# include <machine/endian.h>