Skip to content

Commit

Permalink
Merge pull request #117 from fperrad/master
Browse files Browse the repository at this point in the history
fix without IPv6
  • Loading branch information
gvvaughan committed Dec 11, 2013
2 parents 92a1893 + 7cd8a3c commit 4963085
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ext/posix/posix.c
Expand Up @@ -3637,6 +3637,7 @@ static int Psetsockopt(lua_State *L)
break;
}
break;
#if defined(IPV6_JOIN_GROUP) && defined(IPV6_LEAVE_GROUP)
case IPPROTO_IPV6:
switch(optname) {
case IPV6_JOIN_GROUP:
Expand All @@ -3650,6 +3651,7 @@ static int Psetsockopt(lua_State *L)
break;
}
break;
#endif
case IPPROTO_TCP:
switch(optname) {
default:
Expand Down Expand Up @@ -4697,13 +4699,27 @@ LUALIB_API int luaopen_posix_c (lua_State *L)
MENTRY( AI_V4MAPPED );
MENTRY( AI_ALL );
MENTRY( AI_ADDRCONFIG );
#endif

#ifdef IPV6_JOIN_GROUP
MENTRY( IPV6_JOIN_GROUP );
#endif
#ifdef IPV6_LEAVE_GROUP
MENTRY( IPV6_LEAVE_GROUP );
#endif
#ifdef IPV6_MULTICAST_HOPS
MENTRY( IPV6_MULTICAST_HOPS );
#endif
#ifdef IPV6_MULTICAST_IF
MENTRY( IPV6_MULTICAST_IF );
#endif
#ifdef IPV6_MULTICAST_LOOP
MENTRY( IPV6_MULTICAST_LOOP );
#endif
#ifdef IPV6_UNICAST_HOPS
MENTRY( IPV6_UNICAST_HOPS );
#endif
#ifdef IPV6_V6ONLY
MENTRY( IPV6_V6ONLY );
#endif
#undef MENTRY
Expand Down

0 comments on commit 4963085

Please sign in to comment.