mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +01:00
Misc networking build fixes
http://bugzilla.gnome.org/show_bug.cgi?id=580301 http://bugzilla.gnome.org/show_bug.cgi?id=584176
This commit is contained in:
parent
85816117e3
commit
5b3d62a7a6
@ -29,19 +29,13 @@
|
|||||||
#include "gasyncresult.h"
|
#include "gasyncresult.h"
|
||||||
#include "ginetaddress.h"
|
#include "ginetaddress.h"
|
||||||
#include "ginetsocketaddress.h"
|
#include "ginetsocketaddress.h"
|
||||||
|
#include "gnetworkingprivate.h"
|
||||||
#include "gresolver.h"
|
#include "gresolver.h"
|
||||||
#include "gsimpleasyncresult.h"
|
#include "gsimpleasyncresult.h"
|
||||||
#include "gsocketaddressenumerator.h"
|
#include "gsocketaddressenumerator.h"
|
||||||
#include "gioerror.h"
|
#include "gioerror.h"
|
||||||
#include "gsocketconnectable.h"
|
#include "gsocketconnectable.h"
|
||||||
|
|
||||||
#ifdef HAVE_NETDB_H
|
|
||||||
#include <netdb.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_WINSOCK2_H
|
|
||||||
#include <winsock2.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "gioalias.h"
|
#include "gioalias.h"
|
||||||
|
@ -28,15 +28,21 @@
|
|||||||
#undef interface
|
#undef interface
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
#include <windns.h>
|
#include <windns.h>
|
||||||
|
#include <mswsock.h>
|
||||||
|
|
||||||
#else /* !G_OS_WIN32 */
|
#else /* !G_OS_WIN32 */
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <arpa/nameser.h>
|
#include <arpa/nameser.h>
|
||||||
#if HAVE_ARPA_NAMESER_COMPAT_H
|
#if defined(HAVE_ARPA_NAMESER_COMPAT_H) && !defined(GETSHORT)
|
||||||
#include <arpa/nameser_compat.h>
|
#include <arpa/nameser_compat.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef T_SRV
|
||||||
|
#define T_SRV 33
|
||||||
|
#endif
|
||||||
|
|
||||||
/* We're supposed to define _GNU_SOURCE to get EAI_NODATA, but that
|
/* We're supposed to define _GNU_SOURCE to get EAI_NODATA, but that
|
||||||
* won't actually work since <features.h> has already been included at
|
* won't actually work since <features.h> has already been included at
|
||||||
* this point. So we define __USE_GNU instead.
|
* this point. So we define __USE_GNU instead.
|
||||||
|
@ -636,7 +636,7 @@ g_resolver_error_from_addrinfo_error (gint err)
|
|||||||
switch (err)
|
switch (err)
|
||||||
{
|
{
|
||||||
case EAI_FAIL:
|
case EAI_FAIL:
|
||||||
#ifndef G_OS_WIN32 /* defined as NONAME claiming it is removed from rfc2553bis */
|
#if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME)
|
||||||
case EAI_NODATA:
|
case EAI_NODATA:
|
||||||
#endif
|
#endif
|
||||||
case EAI_NONAME:
|
case EAI_NONAME:
|
||||||
|
@ -34,15 +34,8 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#ifndef G_OS_WIN32
|
#ifndef G_OS_WIN32
|
||||||
# include <netinet/in.h>
|
|
||||||
# include <arpa/inet.h>
|
|
||||||
# include <netdb.h>
|
|
||||||
# include <fcntl.h>
|
# include <fcntl.h>
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
# include <sys/types.h>
|
|
||||||
#else
|
|
||||||
# include <winsock2.h>
|
|
||||||
# include <mswsock.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "gsocket.h"
|
#include "gsocket.h"
|
||||||
@ -53,6 +46,7 @@
|
|||||||
#include "gioerror.h"
|
#include "gioerror.h"
|
||||||
#include "gioenums.h"
|
#include "gioenums.h"
|
||||||
#include "gioerror.h"
|
#include "gioerror.h"
|
||||||
|
#include "gnetworkingprivate.h"
|
||||||
#include "glibintl.h"
|
#include "glibintl.h"
|
||||||
|
|
||||||
#include "gioalias.h"
|
#include "gioalias.h"
|
||||||
|
@ -44,14 +44,11 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "gsocketcontrolmessage.h"
|
#include "gsocketcontrolmessage.h"
|
||||||
|
#include "gnetworkingprivate.h"
|
||||||
#include "glibintl.h"
|
#include "glibintl.h"
|
||||||
|
|
||||||
#ifndef G_OS_WIN32
|
#ifndef G_OS_WIN32
|
||||||
#include "gunixfdmessage.h"
|
#include "gunixfdmessage.h"
|
||||||
#include <sys/socket.h>
|
|
||||||
#else
|
|
||||||
# include <winsock2.h>
|
|
||||||
# include <mswsock.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "gioalias.h"
|
#include "gioalias.h"
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include "glibintl.h"
|
#include "glibintl.h"
|
||||||
|
|
||||||
#include <resolv.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
@ -24,8 +24,6 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
|
|
||||||
#include "gunixsocketaddress.h"
|
#include "gunixsocketaddress.h"
|
||||||
#include "glibintl.h"
|
#include "glibintl.h"
|
||||||
|
@ -21,8 +21,25 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
|
|
||||||
|
/* We want to build the fork-based version, not the threaded version. */
|
||||||
#undef HAVE_PTHREAD
|
#undef HAVE_PTHREAD
|
||||||
|
|
||||||
|
/* libasyncns doesn't actually need this include, and it breaks
|
||||||
|
* old OS X. #580301. Remove if asyncns.c stops including
|
||||||
|
* <arpa/nameser_compat.h> in the future.
|
||||||
|
*/
|
||||||
|
#undef HAVE_ARPA_NAMESER_COMPAT_H
|
||||||
|
|
||||||
|
/* Also for old OS X, #580301. Remove if these are added to asyncns.c
|
||||||
|
* in the future.
|
||||||
|
*/
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
/* Some BSDs require this for getrlimit */
|
||||||
|
#include <sys/resource.h>
|
||||||
|
|
||||||
#include "asyncns.h"
|
#include "asyncns.h"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user