aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/nifs/common/socket_util.c
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2018-09-21 13:59:04 +0200
committerMicael Karlberg <[email protected]>2018-09-21 13:59:04 +0200
commit2b6aacdbb3f6b0ee23c400e2046ae8fe7f282ec1 (patch)
treee4783436ad8f87ba6f420c90a6e987df192010b2 /erts/emulator/nifs/common/socket_util.c
parentceb5ac40d519cc475c6c3252a2e4f87cdcd5b6f0 (diff)
parent0474c879d44f3fe5696f8c867ffb283ccab43949 (diff)
downloadotp-2b6aacdbb3f6b0ee23c400e2046ae8fe7f282ec1.tar.gz
otp-2b6aacdbb3f6b0ee23c400e2046ae8fe7f282ec1.tar.bz2
otp-2b6aacdbb3f6b0ee23c400e2046ae8fe7f282ec1.zip
Merge branch 'bmk/20180918/nififying_inet_freebsd/OTP-14831' into bmk/20180918/nififying_inet/OTP-14831
Also needed to "revert" two of the chnages, related to assoc id. This is in FreeBSD defined as an uint32 but on linux as a int32.
Diffstat (limited to 'erts/emulator/nifs/common/socket_util.c')
-rw-r--r--erts/emulator/nifs/common/socket_util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/erts/emulator/nifs/common/socket_util.c b/erts/emulator/nifs/common/socket_util.c
index a73b40cd29..8bb725fb5b 100644
--- a/erts/emulator/nifs/common/socket_util.c
+++ b/erts/emulator/nifs/common/socket_util.c
@@ -1238,7 +1238,11 @@ char* esock_decode_protocol(ErlNifEnv* env,
*proto = IPPROTO_IP;
#endif
} else if (COMPARE(esock_atom_ipv6, eProto) == 0) {
+#if defined(SOL_IPV6)
*proto = SOL_IPV6;
+#else
+ *proto = IPPROTO_IPV6;
+#endif
} else if (COMPARE(esock_atom_tcp, eProto) == 0) {
*proto = IPPROTO_TCP;
} else if (COMPARE(esock_atom_udp, eProto) == 0) {