Mercurial > hg > nginx
comparison src/os/unix/ngx_freebsd_config.h @ 2111:4300c587db9e stable-0.5
r1901, r1902, r2032 merge:
bugfixes in channel:
*) avoid endless loop if epoll is used
*) use CMSG_LEN(), this fixes an alert
"sendmsg() failed (9: Bad file descriptor)" on some 64-bit platforms
*) read channel until EAGAIN
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 07 Jul 2008 11:58:55 +0000 |
parents | e2ab812358bd |
children |
comparison
equal
deleted
inserted
replaced
2110:aeeb3ca9de06 | 2111:4300c587db9e |
---|---|
46 #include <sys/param.h> /* ALIGN() */ | 46 #include <sys/param.h> /* ALIGN() */ |
47 | 47 |
48 | 48 |
49 #if __FreeBSD_version < 400017 | 49 #if __FreeBSD_version < 400017 |
50 | 50 |
51 /* FreeBSD 3.x has no CMSG_SPACE() at all and has the broken CMSG_DATA() */ | 51 /* |
52 * FreeBSD 3.x has no CMSG_SPACE() and CMSG_LEN() and has the broken CMSG_DATA() | |
53 */ | |
52 | 54 |
53 #undef CMSG_SPACE | 55 #undef CMSG_SPACE |
54 #define CMSG_SPACE(l) (ALIGN(sizeof(struct cmsghdr)) + ALIGN(l)) | 56 #define CMSG_SPACE(l) (ALIGN(sizeof(struct cmsghdr)) + ALIGN(l)) |
57 | |
58 #undef CMSG_LEN | |
59 #define CMSG_LEN(l) (ALIGN(sizeof(struct cmsghdr)) + (l)) | |
55 | 60 |
56 #undef CMSG_DATA | 61 #undef CMSG_DATA |
57 #define CMSG_DATA(cmsg) ((u_char *)(cmsg) + ALIGN(sizeof(struct cmsghdr))) | 62 #define CMSG_DATA(cmsg) ((u_char *)(cmsg) + ALIGN(sizeof(struct cmsghdr))) |
58 | 63 |
59 #endif | 64 #endif |