]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix Windows error code definition workaround
authorJouni Malinen <j@w1.fi>
Sun, 1 Sep 2019 13:14:08 +0000 (16:14 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 1 Sep 2019 14:19:43 +0000 (17:19 +0300)
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 <j@w1.fi>
wpa_supplicant/rrm.c

index 8468b2f86bd0c75adfaf93d0f93ed6b4faaea87a..e0723df213d8a4e006412a72607c8abe3e3bfe25 100644 (file)
@@ -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)