Index: src/OFFile.m ================================================================== --- src/OFFile.m +++ src/OFFile.m @@ -26,10 +26,15 @@ #include #include #include #include #include + +/* Work around __block being used by glibc */ +#ifdef __GLIBC__ +# undef __USE_XOPEN +#endif #include #include #include Index: src/OFProcess.m ================================================================== --- src/OFProcess.m +++ src/OFProcess.m @@ -15,10 +15,15 @@ */ #include "config.h" #include + +/* Work around __block being used by glibc */ +#ifdef __GLIBC__ +# undef __USE_XOPEN +#endif #ifndef _WIN32 # include # include # include Index: src/OFStdIOStream.m ================================================================== --- src/OFStdIOStream.m +++ src/OFStdIOStream.m @@ -13,10 +13,16 @@ * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" + +/* Work around __block being used by glibc */ +#include /* include any libc header to get the libc defines */ +#ifdef __GLIBC__ +# undef __USE_XOPEN +#endif #include #import "OFStdIOStream.h" #import "OFDate.h" Index: src/OFSystemInfo.m ================================================================== --- src/OFSystemInfo.m +++ src/OFSystemInfo.m @@ -15,10 +15,16 @@ */ #define __NO_EXT_QNX #include "config.h" + +/* Work around __block being used by glibc */ +#include /* include any libc header to get the libc defines */ +#ifdef __GLIBC__ +# undef __USE_XOPEN +#endif #include #import "OFSystemInfo.h" #import "OFString.h" Index: src/OFThread.m ================================================================== --- src/OFThread.m +++ src/OFThread.m @@ -20,10 +20,15 @@ #include "config.h" #include #include #include + +/* Work around __block being used by glibc */ +#ifdef __GLIBC__ +# undef __USE_XOPEN +#endif #ifndef _WIN32 # include #endif Index: src/socket_helpers.h ================================================================== --- src/socket_helpers.h +++ src/socket_helpers.h @@ -11,10 +11,15 @@ * Alternatively, it may be distributed under the terms of the GNU General * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ + +/* Work around __block being used by glibc */ +#ifdef __GLIBC__ +# undef __USE_XOPEN +#endif #include #ifdef HAVE_ARPA_INET_H # include