Index: Makefile --- Makefile.orig 2020-07-07 20:11:02.516426000 +0200 +++ Makefile 2020-07-07 20:11:18.754074000 +0200 @@ -177,7 +177,7 @@ # We rely on signed integer wraparound on overflow, however clang think it # can do whatever it wants since it's an undefined behavior, so use -fwrapv # to be sure we get the intended behavior. -SPEC_CFLAGS := -Wall -Wextra -Wdeclaration-after-statement +SPEC_CFLAGS := SPEC_CFLAGS += $(call cc-opt-alt,-fwrapv,$(call cc-opt,-fno-strict-overflow)) SPEC_CFLAGS += $(call cc-nowarn,address-of-packed-member) SPEC_CFLAGS += $(call cc-nowarn,unused-label) Index: src/hlua_fcn.c --- src/hlua_fcn.c.orig 2020-07-07 16:33:14.000000000 +0200 +++ src/hlua_fcn.c 2020-07-07 20:11:02.516781000 +0200 @@ -1527,7 +1527,8 @@ lua_pushboolean(L, 1); return 1; } - } else { +#if defined(AF_INET6) && !defined(__FreeBSD__) + } else if (addr1->type === AF_INET6) { int i; for (i = 0; i < 16; i += 4) { @@ -1541,6 +1542,7 @@ lua_pushboolean(L, 1); return 1; } +#endif } lua_pushboolean(L, 0);