wpa_supplicant: Fix for GCC2.

This commit is contained in:
Augustin Cavalier
2023-11-24 12:54:21 -05:00
parent e5c59176a4
commit 745d17f32a
2 changed files with 24 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
From c32dc38056e9b2e51a9a2c36084bac97eae2c056 Mon Sep 17 00:00:00 2001
From a0b6ad239c846c3804e2cc4fd65e0d94452de949 Mon Sep 17 00:00:00 2001
From: Augustin Cavalier <waddlesplash@gmail.com>
Date: Thu, 3 Mar 2022 15:16:00 -0500
Subject: [PATCH] GCC2 fixes.
@@ -7,9 +7,10 @@ Subject: [PATCH] GCC2 fixes.
src/ap/hostapd.h | 2 +-
src/common/ieee802_11_common.h | 2 +-
src/common/ieee802_11_defs.h | 6 +++---
src/drivers/driver_bsd.c | 5 +++++
wpa_supplicant/bss.h | 2 +-
wpa_supplicant/wpa_gui-haiku/main_haiku.cpp | 1 +
5 files changed, 7 insertions(+), 6 deletions(-)
6 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
index f3ca752..aee5518 100644
@@ -65,6 +66,23 @@ index d04d2d6..41d157f 100644
} STRUCT_PACKED coloc_intf_report;
struct {
u8 action; /* 15 */
diff --git a/src/drivers/driver_bsd.c b/src/drivers/driver_bsd.c
index 602ea6a..6172836 100644
--- a/src/drivers/driver_bsd.c
+++ b/src/drivers/driver_bsd.c
@@ -36,7 +36,12 @@
#include <netinet/ether.h>
#endif /* __GLIBC__ */
#include <net80211/ieee80211.h>
+/* hack: avoids "incomplete type" errors */
+#undef __HAIKU__
+#define __FreeBSD__
#include <net80211/ieee80211_ioctl.h>
+#undef __FreeBSD__
+#define __HAIKU__
#include <net80211/ieee80211_crypto.h>
#endif /* __DragonFly__ || __GLIBC__ */
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
diff --git a/wpa_supplicant/bss.h b/wpa_supplicant/bss.h
index 4078b9b..11e0b90 100644
--- a/wpa_supplicant/bss.h
@@ -79,10 +97,10 @@ index 4078b9b..11e0b90 100644
static inline const u8 * wpa_bss_ie_ptr(const struct wpa_bss *bss)
diff --git a/wpa_supplicant/wpa_gui-haiku/main_haiku.cpp b/wpa_supplicant/wpa_gui-haiku/main_haiku.cpp
index 3171d89..3776742 100644
index b589882..1394e88 100644
--- a/wpa_supplicant/wpa_gui-haiku/main_haiku.cpp
+++ b/wpa_supplicant/wpa_gui-haiku/main_haiku.cpp
@@ -52,6 +52,7 @@ extern "C" {
@@ -53,6 +53,7 @@ extern "C" {
#undef B_TRANSLATION_CONTEXT
#define B_TRANSLATION_CONTEXT "wpa_supplicant"
@@ -91,5 +109,5 @@ index 3171d89..3776742 100644
static const uint32 kMsgJoinTimeout = 'jnto';
static const char *kWPASupplicantKeyring = "wpa_supplicant";
--
2.30.2
2.42.0

View File

@@ -10,7 +10,7 @@ HOMEPAGE="https://w1.fi/wpa_supplicant/"
COPYRIGHT="2003-2022 Jouni Malinen"
LICENSE="BSD (2-clause)
GNU GPL v2"
REVISION="1"
REVISION="2"
srcGitRev="e952d309dfd57cf04cb9b461bd7f62d0537eaa3f"
SOURCE_URI="https://github.com/haiku/wpa_supplicant/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="81dee45a229d8cd292c214101179c618798b0e1788229d2a9e341445900f6f25"