diff options
author | ShooterIT <wangyuancode@163.com> | 2020-04-14 23:56:34 +0800 |
---|---|---|
committer | ShooterIT <wangyuancode@163.com> | 2020-04-14 23:56:34 +0800 |
commit | 9cf500a3f67e4e2ce51414c354e3472faf095d5b (patch) | |
tree | bbb2b6f9fdd91ffaed655fe0e7a28e8275eede00 /src/config.h | |
parent | 7428f5121755f0f49aaf5f46321da64cd122aa1a (diff) | |
download | redis-9cf500a3f67e4e2ce51414c354e3472faf095d5b.tar.gz |
Implements sendfile for redis.
Diffstat (limited to 'src/config.h')
-rw-r--r-- | src/config.h | 6 |
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> |