Enabled IPV6_RECVPKTINFO / IPV6_PKTINFO on macOS.

This change allows setting the destination IPv6 address of a UDP datagram
received on a wildcard socket.
This commit is contained in:
Sergey Kandaurov 2017-04-17 14:42:12 +03:00
parent 8ee2de5e9c
commit 97210c717d
2 changed files with 6 additions and 1 deletions

View File

@ -17,6 +17,9 @@ ngx_spacer='
MAIN_LINK= MAIN_LINK=
MODULE_LINK="-shared -Wl,-undefined,dynamic_lookup" MODULE_LINK="-shared -Wl,-undefined,dynamic_lookup"
CC_AUX_FLAGS="$CC_AUX_FLAGS -D__APPLE_USE_RFC_3542"
# kqueue # kqueue
echo " + kqueue found" echo " + kqueue found"
@ -86,7 +89,6 @@ ngx_feature_test="int kq;
# sendfile() # sendfile()
CC_AUX_FLAGS="$CC_AUX_FLAGS"
ngx_feature="sendfile()" ngx_feature="sendfile()"
ngx_feature_name="NGX_HAVE_SENDFILE" ngx_feature_name="NGX_HAVE_SENDFILE"
ngx_feature_run=yes ngx_feature_run=yes

View File

@ -9,6 +9,9 @@
#define _NGX_DARWIN_CONFIG_H_INCLUDED_ #define _NGX_DARWIN_CONFIG_H_INCLUDED_
#define __APPLE_USE_RFC_3542 /* IPV6_PKTINFO */
#include <sys/types.h> #include <sys/types.h>
#include <sys/time.h> #include <sys/time.h>
#include <unistd.h> #include <unistd.h>