[libnma/ac/owe: 2/2] wireless-security: move the SAE compatibility macro for the compatibility file




commit 377c38b53d85dcb39c68e7750aeb1f4bb0e39b8e
Author: Ana Cabral <acabral redhat com>
Date:   Fri Mar 11 22:30:50 2022 +0100

    wireless-security: move the SAE compatibility macro for the compatibility file

 shared/nm-libnm-compat.h | 6 ++++++
 src/nma-wifi-dialog.c    | 3 ---
 2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/shared/nm-libnm-compat.h b/shared/nm-libnm-compat.h
index bb69c53c..b31496e2 100644
--- a/shared/nm-libnm-compat.h
+++ b/shared/nm-libnm-compat.h
@@ -28,6 +28,12 @@
                G_GNUC_END_IGNORE_DEPRECATIONS \
        })
 
+#define _NMU_SEC_SAE ((NMUtilsSecurityType) 9)
+#if !NM_CHECK_VERSION (1,22,0)
+#define NMU_SEC_SAE _NMU_SEC_SAE
+#endif
+G_STATIC_ASSERT (NMU_SEC_SAE == _NMU_SEC_SAE);
+
 #define _NMU_SEC_OWE ((NMUtilsSecurityType) 10)
 #if !NM_CHECK_VERSION (1,24,0)
 #define NMU_SEC_OWE _NMU_SEC_OWE
diff --git a/src/nma-wifi-dialog.c b/src/nma-wifi-dialog.c
index bb8c4f82..ea1127a9 100644
--- a/src/nma-wifi-dialog.c
+++ b/src/nma-wifi-dialog.c
@@ -18,9 +18,6 @@
 #include "nma-ws.h"
 #include "nma-eap.h"
 
-/* For compatibility with NetworkManager-1.20 and earlier. */
-#define NMU_SEC_SAE 9
-
 G_DEFINE_TYPE (NMAWifiDialog, nma_wifi_dialog, GTK_TYPE_DIALOG)
 
 #define NMA_WIFI_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]