]> git.kaiwu.me - nginx.git/commitdiff
Enabled IPV6_RECVPKTINFO / IPV6_PKTINFO on macOS.
authorSergey Kandaurov <pluknet@nginx.com>
Mon, 17 Apr 2017 11:42:12 +0000 (14:42 +0300)
committerSergey Kandaurov <pluknet@nginx.com>
Mon, 17 Apr 2017 11:42:12 +0000 (14:42 +0300)
This change allows setting the destination IPv6 address of a UDP datagram
received on a wildcard socket.

auto/os/darwin
src/os/unix/ngx_darwin_config.h

index b4b3ad3063088e8779db255d36ce6d4efa1cc270..429468f7fd400c7b62d6b7b4ac9046ae5097789d 100644 (file)
@@ -17,6 +17,9 @@ ngx_spacer='
 MAIN_LINK=
 MODULE_LINK="-shared -Wl,-undefined,dynamic_lookup"
 
+CC_AUX_FLAGS="$CC_AUX_FLAGS -D__APPLE_USE_RFC_3542"
+
+
 # kqueue
 
 echo " + kqueue found"
@@ -86,7 +89,6 @@ ngx_feature_test="int  kq;
 
 # sendfile()
 
-CC_AUX_FLAGS="$CC_AUX_FLAGS"
 ngx_feature="sendfile()"
 ngx_feature_name="NGX_HAVE_SENDFILE"
 ngx_feature_run=yes
index cfe3ce223803063f46350082207ef47795f151ad..0dfe6337416f0082c19b137c02f36569ef368292 100644 (file)
@@ -9,6 +9,9 @@
 #define _NGX_DARWIN_CONFIG_H_INCLUDED_
 
 
+#define __APPLE_USE_RFC_3542    /* IPV6_PKTINFO */
+
+
 #include <sys/types.h>
 #include <sys/time.h>
 #include <unistd.h>