From eea61d7da9af7c84e02d34eafdf72f13aee48f6d Mon Sep 17 00:00:00 2001 From: Andoni Morales Alastruey Date: Wed, 14 Mar 2012 21:59:04 +0100 Subject: [PATCH] Fix compilation with mingw-w64 --- dbus/dbus-sysdeps.c | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/dbus/dbus-sysdeps.c b/dbus/dbus-sysdeps.c index bab516d..cadb8e9 100644 --- a/dbus/dbus-sysdeps.c +++ b/dbus/dbus-sysdeps.c @@ -911,19 +911,21 @@ _dbus_error_from_errno (int error_number) #ifdef EPROTONOSUPPORT case EPROTONOSUPPORT: return DBUS_ERROR_NOT_SUPPORTED; -#endif +#else #ifdef WSAEPROTONOSUPPORT case WSAEPROTONOSUPPORT: return DBUS_ERROR_NOT_SUPPORTED; #endif +#endif #ifdef EAFNOSUPPORT case EAFNOSUPPORT: return DBUS_ERROR_NOT_SUPPORTED; -#endif +#else #ifdef WSAEAFNOSUPPORT case WSAEAFNOSUPPORT: return DBUS_ERROR_NOT_SUPPORTED; #endif +#endif #ifdef ENFILE case ENFILE: return DBUS_ERROR_LIMITS_EXCEEDED; /* kernel out of memory */ @@ -951,35 +953,39 @@ _dbus_error_from_errno (int error_number) #ifdef ECONNREFUSED case ECONNREFUSED: return DBUS_ERROR_NO_SERVER; -#endif +#else #ifdef WSAECONNREFUSED case WSAECONNREFUSED: return DBUS_ERROR_NO_SERVER; #endif +#endif #ifdef ETIMEDOUT case ETIMEDOUT: return DBUS_ERROR_TIMEOUT; -#endif +#else #ifdef WSAETIMEDOUT case WSAETIMEDOUT: return DBUS_ERROR_TIMEOUT; #endif +#endif #ifdef ENETUNREACH case ENETUNREACH: return DBUS_ERROR_NO_NETWORK; -#endif +#else #ifdef WSAENETUNREACH case WSAENETUNREACH: return DBUS_ERROR_NO_NETWORK; #endif +#endif #ifdef EADDRINUSE case EADDRINUSE: return DBUS_ERROR_ADDRESS_IN_USE; -#endif +#else #ifdef WSAEADDRINUSE case WSAEADDRINUSE: return DBUS_ERROR_ADDRESS_IN_USE; #endif +#endif #ifdef EEXIST case EEXIST: return DBUS_ERROR_FILE_EXISTS; -- 1.7.5.4