mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
wpa_supplicant 2.11.
This commit is contained in:
@@ -1,113 +0,0 @@
|
||||
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.
|
||||
|
||||
---
|
||||
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 +
|
||||
6 files changed, 12 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
|
||||
index f3ca752..aee5518 100644
|
||||
--- a/src/ap/hostapd.h
|
||||
+++ b/src/ap/hostapd.h
|
||||
@@ -146,7 +146,7 @@ struct hostapd_sae_commit_queue {
|
||||
struct dl_list list;
|
||||
int rssi;
|
||||
size_t len;
|
||||
- u8 msg[];
|
||||
+ u8 msg[0];
|
||||
};
|
||||
|
||||
/**
|
||||
diff --git a/src/common/ieee802_11_common.h b/src/common/ieee802_11_common.h
|
||||
index 3c57803..0c846dc 100644
|
||||
--- a/src/common/ieee802_11_common.h
|
||||
+++ b/src/common/ieee802_11_common.h
|
||||
@@ -15,7 +15,7 @@
|
||||
struct element {
|
||||
u8 id;
|
||||
u8 datalen;
|
||||
- u8 data[];
|
||||
+ u8 data[0];
|
||||
} STRUCT_PACKED;
|
||||
|
||||
struct hostapd_hw_modes;
|
||||
diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h
|
||||
index d04d2d6..41d157f 100644
|
||||
--- a/src/common/ieee802_11_defs.h
|
||||
+++ b/src/common/ieee802_11_defs.h
|
||||
@@ -1001,12 +1001,12 @@ struct ieee80211_mgmt {
|
||||
struct {
|
||||
u8 action;
|
||||
u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN];
|
||||
- u8 variable[]; /* OCI element */
|
||||
+ u8 variable[0]; /* OCI element */
|
||||
} STRUCT_PACKED sa_query_req;
|
||||
struct {
|
||||
u8 action; /* */
|
||||
u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN];
|
||||
- u8 variable[]; /* OCI element */
|
||||
+ u8 variable[0]; /* OCI element */
|
||||
} STRUCT_PACKED sa_query_resp;
|
||||
struct {
|
||||
u8 action;
|
||||
@@ -1067,7 +1067,7 @@ struct ieee80211_mgmt {
|
||||
struct {
|
||||
u8 action; /* 12 */
|
||||
u8 dialog_token;
|
||||
- u8 variable[];
|
||||
+ u8 variable[0];
|
||||
} 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
|
||||
+++ b/wpa_supplicant/bss.h
|
||||
@@ -122,7 +122,7 @@ struct wpa_bss {
|
||||
size_t beacon_ie_len;
|
||||
/* followed by ie_len octets of IEs */
|
||||
/* followed by beacon_ie_len octets of IEs */
|
||||
- u8 ies[];
|
||||
+ u8 ies[0];
|
||||
};
|
||||
|
||||
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 b589882..1394e88 100644
|
||||
--- a/wpa_supplicant/wpa_gui-haiku/main_haiku.cpp
|
||||
+++ b/wpa_supplicant/wpa_gui-haiku/main_haiku.cpp
|
||||
@@ -53,6 +53,7 @@ extern "C" {
|
||||
#undef B_TRANSLATION_CONTEXT
|
||||
#define B_TRANSLATION_CONTEXT "wpa_supplicant"
|
||||
|
||||
+#undef bool
|
||||
|
||||
static const uint32 kMsgJoinTimeout = 'jnto';
|
||||
static const char *kWPASupplicantKeyring = "wpa_supplicant";
|
||||
--
|
||||
2.42.0
|
||||
|
||||
@@ -0,0 +1,187 @@
|
||||
From ca6784d18fed1640ced8a404951a928ea5b3b0a2 Mon Sep 17 00:00:00 2001
|
||||
From: Augustin Cavalier <waddlesplash@gmail.com>
|
||||
Date: Tue, 12 Nov 2024 23:27:17 -0500
|
||||
Subject: [PATCH] GCC2 fixes.
|
||||
|
||||
---
|
||||
src/ap/hostapd.h | 2 +-
|
||||
src/ap/sta_info.h | 2 +-
|
||||
src/common/ieee802_11_common.h | 2 +-
|
||||
src/common/ieee802_11_defs.h | 14 +++++++-------
|
||||
src/drivers/driver_bsd.c | 5 +++++
|
||||
wpa_supplicant/bss.h | 2 +-
|
||||
wpa_supplicant/events.c | 5 +++--
|
||||
wpa_supplicant/wpa_gui-haiku/main_haiku.cpp | 1 +
|
||||
8 files changed, 20 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
|
||||
index dcf395ca..fe3fa13d 100644
|
||||
--- a/src/ap/hostapd.h
|
||||
+++ b/src/ap/hostapd.h
|
||||
@@ -164,7 +164,7 @@ struct hostapd_sae_commit_queue {
|
||||
struct dl_list list;
|
||||
int rssi;
|
||||
size_t len;
|
||||
- u8 msg[];
|
||||
+ u8 msg[0];
|
||||
};
|
||||
|
||||
/**
|
||||
diff --git a/src/ap/sta_info.h b/src/ap/sta_info.h
|
||||
index 84629358..61fc39d9 100644
|
||||
--- a/src/ap/sta_info.h
|
||||
+++ b/src/ap/sta_info.h
|
||||
@@ -61,7 +61,7 @@ struct mbo_non_pref_chan_info {
|
||||
u8 pref;
|
||||
u8 reason_code;
|
||||
u8 num_channels;
|
||||
- u8 channels[];
|
||||
+ u8 channels[0];
|
||||
};
|
||||
|
||||
struct pending_eapol_rx {
|
||||
diff --git a/src/common/ieee802_11_common.h b/src/common/ieee802_11_common.h
|
||||
index 214e2d93..5c092d68 100644
|
||||
--- a/src/common/ieee802_11_common.h
|
||||
+++ b/src/common/ieee802_11_common.h
|
||||
@@ -15,7 +15,7 @@
|
||||
struct element {
|
||||
u8 id;
|
||||
u8 datalen;
|
||||
- u8 data[];
|
||||
+ u8 data[0];
|
||||
} STRUCT_PACKED;
|
||||
|
||||
struct hostapd_hw_modes;
|
||||
diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h
|
||||
index 58a63511..6b3864a3 100644
|
||||
--- a/src/common/ieee802_11_defs.h
|
||||
+++ b/src/common/ieee802_11_defs.h
|
||||
@@ -1079,12 +1079,12 @@ struct ieee80211_mgmt {
|
||||
struct {
|
||||
u8 action;
|
||||
u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN];
|
||||
- u8 variable[]; /* OCI element */
|
||||
+ u8 variable[0]; /* OCI element */
|
||||
} STRUCT_PACKED sa_query_req;
|
||||
struct {
|
||||
u8 action; /* */
|
||||
u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN];
|
||||
- u8 variable[]; /* OCI element */
|
||||
+ u8 variable[0]; /* OCI element */
|
||||
} STRUCT_PACKED sa_query_resp;
|
||||
struct {
|
||||
u8 action;
|
||||
@@ -1145,7 +1145,7 @@ struct ieee80211_mgmt {
|
||||
struct {
|
||||
u8 action; /* 12 */
|
||||
u8 dialog_token;
|
||||
- u8 variable[];
|
||||
+ u8 variable[0];
|
||||
} STRUCT_PACKED coloc_intf_report;
|
||||
struct {
|
||||
u8 action; /* 15 */
|
||||
@@ -2763,7 +2763,7 @@ struct eht_ml_basic_common_info {
|
||||
* MLD Capabilities and Operations: 2 octets
|
||||
* AP MLD ID: 1 octet
|
||||
*/
|
||||
- u8 variable[];
|
||||
+ u8 variable[0];
|
||||
} STRUCT_PACKED;
|
||||
|
||||
#define EHT_ML_LINK_ID_MSK 0x0f
|
||||
@@ -2813,7 +2813,7 @@ struct ieee80211_eht_per_sta_profile {
|
||||
le16 sta_control;
|
||||
|
||||
/* Followed by STA Info and STA Profile fields */
|
||||
- u8 variable[];
|
||||
+ u8 variable[0];
|
||||
} STRUCT_PACKED;
|
||||
|
||||
/* IEEE P802.11be/D4.0, 9.4.2.312.3 - Probe Request Multi-Link element
|
||||
@@ -2831,7 +2831,7 @@ struct eht_ml_probe_req_common_info {
|
||||
*
|
||||
* AP MLD ID: 1 octet
|
||||
*/
|
||||
- u8 variable[];
|
||||
+ u8 variable[0];
|
||||
} STRUCT_PACKED;
|
||||
|
||||
/* IEEE P802.11be/D4.0, 9.4.2.312.4 - Reconfiguration Multi-Link element */
|
||||
@@ -2852,7 +2852,7 @@ struct ieee80211_eht_ml {
|
||||
le16 ml_control;
|
||||
|
||||
/* Followed by Common Info and Link Info fields */
|
||||
- u8 variable[];
|
||||
+ u8 variable[0];
|
||||
} STRUCT_PACKED;
|
||||
|
||||
/* Table 9-401c - Optional subelement IDs for Link Info field of the
|
||||
diff --git a/src/drivers/driver_bsd.c b/src/drivers/driver_bsd.c
|
||||
index c1a7a4dd..1868908c 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 2079606a..c93a47cf 100644
|
||||
--- a/wpa_supplicant/bss.h
|
||||
+++ b/wpa_supplicant/bss.h
|
||||
@@ -141,7 +141,7 @@ struct wpa_bss {
|
||||
|
||||
/* followed by ie_len octets of IEs */
|
||||
/* followed by beacon_ie_len octets of IEs */
|
||||
- u8 ies[];
|
||||
+ u8 ies[0];
|
||||
};
|
||||
|
||||
static inline const u8 * wpa_bss_ie_ptr(const struct wpa_bss *bss)
|
||||
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
|
||||
index 49917f7a..db5ff34a 100644
|
||||
--- a/wpa_supplicant/events.c
|
||||
+++ b/wpa_supplicant/events.c
|
||||
@@ -2718,6 +2718,7 @@ static int wpas_select_network_from_last_scan(struct wpa_supplicant *wpa_s,
|
||||
if (new_scan)
|
||||
wpa_supplicant_rsn_preauth_scan_results(wpa_s);
|
||||
} else if (own_request) {
|
||||
+ int timeout_sec, timeout_usec;
|
||||
if (wpa_s->support_6ghz && trigger_6ghz_scan && data &&
|
||||
wpas_trigger_6ghz_scan(wpa_s, data) < 0)
|
||||
return 1;
|
||||
@@ -2727,8 +2728,8 @@ static int wpas_select_network_from_last_scan(struct wpa_supplicant *wpa_s,
|
||||
* own scan request and not due to a scan request on
|
||||
* another shared interface, try another scan.
|
||||
*/
|
||||
- int timeout_sec = wpa_s->scan_interval;
|
||||
- int timeout_usec = 0;
|
||||
+ timeout_sec = wpa_s->scan_interval;
|
||||
+ timeout_usec = 0;
|
||||
#ifdef CONFIG_P2P
|
||||
int res;
|
||||
|
||||
diff --git a/wpa_supplicant/wpa_gui-haiku/main_haiku.cpp b/wpa_supplicant/wpa_gui-haiku/main_haiku.cpp
|
||||
index b5898822..1394e885 100644
|
||||
--- a/wpa_supplicant/wpa_gui-haiku/main_haiku.cpp
|
||||
+++ b/wpa_supplicant/wpa_gui-haiku/main_haiku.cpp
|
||||
@@ -53,6 +53,7 @@ extern "C" {
|
||||
#undef B_TRANSLATION_CONTEXT
|
||||
#define B_TRANSLATION_CONTEXT "wpa_supplicant"
|
||||
|
||||
+#undef bool
|
||||
|
||||
static const uint32 kMsgJoinTimeout = 'jnto';
|
||||
static const char *kWPASupplicantKeyring = "wpa_supplicant";
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@@ -10,12 +10,12 @@ HOMEPAGE="https://w1.fi/wpa_supplicant/"
|
||||
COPYRIGHT="2003-2022 Jouni Malinen"
|
||||
LICENSE="BSD (2-clause)
|
||||
GNU GPL v2"
|
||||
REVISION="3"
|
||||
srcGitRev="e952d309dfd57cf04cb9b461bd7f62d0537eaa3f"
|
||||
REVISION="1"
|
||||
srcGitRev="f17c8f0b4f9fe0223429997435ac8e3f06e31c25"
|
||||
SOURCE_URI="https://github.com/haiku/wpa_supplicant/archive/$srcGitRev.tar.gz"
|
||||
CHECKSUM_SHA256="81dee45a229d8cd292c214101179c618798b0e1788229d2a9e341445900f6f25"
|
||||
CHECKSUM_SHA256="0a51888ad14ca09716b07205b122dfc1795472e895d3eda62a77a7116e59b237"
|
||||
SOURCE_DIR="wpa_supplicant-$srcGitRev"
|
||||
PATCHES="wpa_supplicant-2.10-gcc2.patch"
|
||||
PATCHES="wpa_supplicant-2.11-gcc2.patch"
|
||||
|
||||
ARCHITECTURES="all"
|
||||
|
||||
Reference in New Issue
Block a user