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




commit 1433eaea6639c401e031d8dbd1ac5acfe74c1007
Author: Ana Cabral <acabral redhat com>
Date:   Fri Mar 11 09:37:51 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 fa66703e..8f8de685 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 cf0b717b..9ad7f20d 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]