diff options
author | Salvatore Sanfilippo <antirez@gmail.com> | 2020-05-22 13:55:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-22 13:55:46 +0200 |
commit | 40161553e2124e5871e4849722e0404debc44d13 (patch) | |
tree | c3651a7a9aaeb467f0942fc906eea8b4ebc162d1 /src/config.h | |
parent | 285817b28abdfc76c573f7c9868cd40af72a5934 (diff) | |
parent | 9cf500a3f67e4e2ce51414c354e3472faf095d5b (diff) | |
download | redis-40161553e2124e5871e4849722e0404debc44d13.tar.gz |
Merge pull request #7096 from ShooterIT/sendfile
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 0fcc42972..23de5d3ad 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> |