mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-05-22 13:30:41 +02:00
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
This commit is contained in:
parent
63d74caabe
commit
2ad4b2d716
@ -36,7 +36,6 @@
|
|||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
|
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#define __USE_GNU
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/un.h>
|
#include <sys/un.h>
|
||||||
@ -86,7 +85,11 @@ g_unix_credentials_message_get_size (GSocketControlMessage *message)
|
|||||||
static int
|
static int
|
||||||
g_unix_credentials_message_get_level (GSocketControlMessage *message)
|
g_unix_credentials_message_get_level (GSocketControlMessage *message)
|
||||||
{
|
{
|
||||||
|
#ifdef __linux__
|
||||||
return SOL_SOCKET;
|
return SOL_SOCKET;
|
||||||
|
#else
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
Loading…
x
Reference in New Issue
Block a user