diff options
author | Lukas Larsson <[email protected]> | 2016-01-27 11:49:34 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2016-01-27 11:49:34 +0100 |
commit | 7e0c7a29f74e855359eb49cb2c231f592e237197 (patch) | |
tree | 44fd2a8b4bef649e77bf9c8ea9bcad7c1bfd8cff /erts | |
parent | f0b7d4797b13a90b4dcee40468a5675a73feb1d4 (diff) | |
parent | af341c420e145f006ed3d9fc9c745ea217689c04 (diff) | |
download | otp-7e0c7a29f74e855359eb49cb2c231f592e237197.tar.gz otp-7e0c7a29f74e855359eb49cb2c231f592e237197.tar.bz2 otp-7e0c7a29f74e855359eb49cb2c231f592e237197.zip |
Merge branch 'maint'
* maint:
erts: Fix sendfile:ing of large files on FreeBSD
Diffstat (limited to 'erts')
-rw-r--r-- | erts/emulator/drivers/unix/unix_efile.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/erts/emulator/drivers/unix/unix_efile.c b/erts/emulator/drivers/unix/unix_efile.c index 46eccc6568..00da48b107 100644 --- a/erts/emulator/drivers/unix/unix_efile.c +++ b/erts/emulator/drivers/unix/unix_efile.c @@ -39,6 +39,11 @@ #ifdef HAVE_SYS_UIO_H #include <sys/types.h> #include <sys/uio.h> +#if defined(HAVE_SENDFILE) && (defined(__FreeBSD__) || defined(__DragonFly__)) +/* Need to define __BSD_VISIBLE in order to expose prototype of sendfile */ +#define __BSD_VISIBLE 1 +#include <sys/socket.h> +#endif #endif #if defined(HAVE_SENDFILE) && (defined(__linux__) || (defined(__sun) && defined(__SVR4))) #include <sys/sendfile.h> |