diff options
author | Igor Sysoev <igor@sysoev.ru> | 2008-02-19 16:34:55 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2008-02-19 16:34:55 +0000 |
commit | 09248b7a55f660d85e70e9999090063651c99904 (patch) | |
tree | ce38918a6b49883bf923d920d3df03d6eebf769e /src/os/unix/ngx_freebsd_config.h | |
parent | bb7c84159f948bb95836d6a54c1046457c44df18 (diff) | |
download | nginx-09248b7a55f660d85e70e9999090063651c99904.tar.gz nginx-09248b7a55f660d85e70e9999090063651c99904.zip |
use CMSG_LEN(), this fixes an alert "sendmsg() failed (9: Bad file descriptor)"
on some 64-bit platforms
Diffstat (limited to 'src/os/unix/ngx_freebsd_config.h')
-rw-r--r-- | src/os/unix/ngx_freebsd_config.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/os/unix/ngx_freebsd_config.h b/src/os/unix/ngx_freebsd_config.h index 818e230ba..24dcdcb46 100644 --- a/src/os/unix/ngx_freebsd_config.h +++ b/src/os/unix/ngx_freebsd_config.h @@ -48,11 +48,16 @@ #if __FreeBSD_version < 400017 -/* FreeBSD 3.x has no CMSG_SPACE() at all and has the broken CMSG_DATA() */ +/* + * FreeBSD 3.x has no CMSG_SPACE() and CMSG_LEN() and has the broken CMSG_DATA() + */ #undef CMSG_SPACE #define CMSG_SPACE(l) (ALIGN(sizeof(struct cmsghdr)) + ALIGN(l)) +#undef CMSG_LEN +#define CMSG_LEN(l) (ALIGN(sizeof(struct cmsghdr)) + (l)) + #undef CMSG_DATA #define CMSG_DATA(cmsg) ((u_char *)(cmsg) + ALIGN(sizeof(struct cmsghdr))) |