Index: ext/posix/sys/resource.c --- ext/posix/sys/resource.c.orig 2015-01-04 13:08:20.000000000 +0100 +++ ext/posix/sys/resource.c 2015-01-12 21:03:19.176366288 +0100 @@ -153,8 +153,12 @@ lua_setfield(L, -2, "version"); LPOSIX_CONST( RLIM_INFINITY ); +#ifdef RLIM_SAVED_CUR LPOSIX_CONST( RLIM_SAVED_CUR ); +#endif +#ifdef RLIM_SAVED_MAX LPOSIX_CONST( RLIM_SAVED_MAX ); +#endif LPOSIX_CONST( RLIMIT_CORE ); LPOSIX_CONST( RLIMIT_CPU ); LPOSIX_CONST( RLIMIT_DATA ); Index: ext/posix/sys/socket.c --- ext/posix/sys/socket.c.orig 2015-01-04 13:08:20.000000000 +0100 +++ ext/posix/sys/socket.c 2015-01-12 21:07:04.526404421 +0100 @@ -29,6 +29,7 @@ #if HAVE_LINUX_NETLINK_H #include #endif +#include #include /* Needs to be before net/if.h on OpenBSD 5.6 */ #ifdef HAVE_NET_IF_H #include @@ -36,9 +37,14 @@ #include #include #include +#if 0 #include +#endif #include #include +#if !defined(PF_UNSPEC) && defined(AF_UNSPEC) +#define PF_UNSPEC AF_UNSPEC +#endif /* strlcpy() implementation for non-BSD based Unices. strlcpy() is a safer less error-prone replacement for strncpy(). */