aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/nifs/common/socket_util.c
diff options
context:
space:
mode:
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) {