Skip to content

Commit

Permalink
Enabled IPV6_RECVPKTINFO / IPV6_PKTINFO on macOS.
Browse files Browse the repository at this point in the history
This change allows setting the destination IPv6 address of a UDP datagram
received on a wildcard socket.
  • Loading branch information
pluknet committed Apr 17, 2017
1 parent 8ee2de5 commit 97210c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion auto/os/darwin
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/os/unix/ngx_darwin_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 97210c7

Please sign in to comment.