diff --git a/libs/miniupnpc/miniupnpc.c b/libs/miniupnpc/miniupnpc.c index b7ca4f6f86..377923e0e3 100644 --- a/libs/miniupnpc/miniupnpc.c +++ b/libs/miniupnpc/miniupnpc.c @@ -4,8 +4,20 @@ * copyright (c) 2005-2007 Thomas Bernard * This software is subjet to the conditions detailed in the * provided LICENCE file. */ -#include +#define __EXTENSIONS__ 1 + +#ifndef MACOSX +#if !defined(_XOPEN_SOURCE) && !defined(__OpenBSD__) && !defined(__NetBSD__) +#ifndef __cplusplus +#define _XOPEN_SOURCE 600 +#endif +#endif +#ifndef __BSD_VISIBLE +#define __BSD_VISIBLE 1 +#endif +#endif #include +#include #include #ifdef WIN32 /* Win32 Specific includes and defines */