From: Matthias Clasen Date: Sat, 15 May 2010 22:15:30 +0000 (-0400) Subject: Fix build on !linux X-Git-Tag: 2.25.6~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2ad4b2d716220f0ef45bbeb56fb90a7438afa21a;p=platform%2Fupstream%2Fglib.git Fix build on !linux Don't define __USE_GNU, thats a glibc-internal macro, and don't use SOL_SOCKET when not including sys/socket.h. Maybe this file should be called glinuxcredentialsmessage.c... Bug #618730 --- diff --git a/gio/gunixcredentialsmessage.c b/gio/gunixcredentialsmessage.c index 15c4c96..bb4ef00 100644 --- a/gio/gunixcredentialsmessage.c +++ b/gio/gunixcredentialsmessage.c @@ -36,7 +36,6 @@ #ifdef __linux__ #define _GNU_SOURCE -#define __USE_GNU #include #include #include @@ -86,7 +85,11 @@ g_unix_credentials_message_get_size (GSocketControlMessage *message) static int g_unix_credentials_message_get_level (GSocketControlMessage *message) { +#ifdef __linux__ return SOL_SOCKET; +#else + return 0; +#endif } static int