From: Jouni Malinen Date: Sun, 1 Sep 2019 13:14:08 +0000 (+0300) Subject: Fix Windows error code definition workaround X-Git-Tag: hostap_2_10~2395 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bf15b1559845ec5fb7e87c837292983cef3cd7e4;p=thirdparty%2Fhostap.git Fix Windows error code definition workaround ENOTCONN, EOPNOTSUPP, and ECANCELED are defined in a newer version of MinGW, so make this workaround conditional on what is defined in the header files. Signed-off-by: Jouni Malinen --- diff --git a/wpa_supplicant/rrm.c b/wpa_supplicant/rrm.c index 8468b2f86..e0723df21 100644 --- a/wpa_supplicant/rrm.c +++ b/wpa_supplicant/rrm.c @@ -101,10 +101,16 @@ void wpas_rrm_process_neighbor_rep(struct wpa_supplicant *wpa_s, #if defined(__CYGWIN__) || defined(CONFIG_NATIVE_WINDOWS) /* Workaround different, undefined for Windows, error codes used here */ +#ifndef ENOTCONN #define ENOTCONN -1 +#endif +#ifndef EOPNOTSUPP #define EOPNOTSUPP -1 +#endif +#ifndef ECANCELED #define ECANCELED -1 #endif +#endif /* Measurement Request element + Location Subject + Maximum Age subelement */ #define MEASURE_REQUEST_LCI_LEN (3 + 1 + 4)