gio: compile GSocketAddress with AF_UNIX on all platforms

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau 2022-01-19 00:03:31 +04:00
parent 3308cfb020
commit 37cab227fd

View File

@ -35,8 +35,10 @@
#include "glibintl.h"
#include "gioenumtypes.h"
#ifdef G_OS_UNIX
#include "gunixsocketaddress.h"
#ifdef G_OS_WIN32
#include "giowin32-afunix.h"
#endif
@ -265,7 +267,6 @@ g_socket_address_new_from_native (gpointer native,
return sockaddr;
}
#ifdef G_OS_UNIX
if (family == AF_UNIX)
{
struct sockaddr_un *addr = (struct sockaddr_un *) native;
@ -299,7 +300,6 @@ g_socket_address_new_from_native (gpointer native,
else
return g_unix_socket_address_new (addr->sun_path);
}
#endif
return g_native_socket_address_new (native, len);
}