meta-sunxi/recipes-kernel/linux/linux-sunxi/0003-gcc5-fixes.patch
Andrey Lebedev 4c6dd3d573
linux-sunxi: fix compilation issue on gcc-9
Error comes in form of

/tmp/ccCGMQmS.s:648: Error: .err encountered

Tested on zeus branch of linux-sunxi.
2020-01-26 12:11:19 +02:00

136 lines
5.6 KiB
Diff

From 83b0b8a7b9cb658d3cc980b4fbcbb2cc8b257ccf Mon Sep 17 00:00:00 2001
From: Trevor Woerner <twoerner@gmail.com>
Date: Thu, 24 Sep 2015 17:07:26 -0400
Subject: [PATCH] gcc5 fixes
gcc5 is pickier about inline functions defined in headers.
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
drivers/net/wireless/rtl8188eu/include/ieee80211.h | 4 ++--
drivers/net/wireless/rtl8189es/include/ieee80211.h | 4 ++--
drivers/net/wireless/rtl8192cu/include/ieee80211.h | 8 ++++----
drivers/net/wireless/rtl8723as/include/ieee80211.h | 4 ++--
drivers/staging/rtl8712/ieee80211.h | 4 ++--
5 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/net/wireless/rtl8188eu/include/ieee80211.h b/drivers/net/wireless/rtl8188eu/include/ieee80211.h
index 1ae96a5..7a301c5 100644
--- a/drivers/net/wireless/rtl8188eu/include/ieee80211.h
+++ b/drivers/net/wireless/rtl8188eu/include/ieee80211.h
@@ -1188,12 +1188,12 @@ enum ieee80211_state {
(((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \
(((Addr[5]) & 0xff) == 0xff))
#else
-extern __inline int is_multicast_mac_addr(const u8 *addr)
+static __inline int is_multicast_mac_addr(const u8 *addr)
{
return ((addr[0] != 0xff) && (0x01 & addr[0]));
}
-extern __inline int is_broadcast_mac_addr(const u8 *addr)
+static __inline int is_broadcast_mac_addr(const u8 *addr)
{
return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
diff --git a/drivers/net/wireless/rtl8189es/include/ieee80211.h b/drivers/net/wireless/rtl8189es/include/ieee80211.h
index 1ae96a5..7a301c5 100644
--- a/drivers/net/wireless/rtl8189es/include/ieee80211.h
+++ b/drivers/net/wireless/rtl8189es/include/ieee80211.h
@@ -1188,12 +1188,12 @@ enum ieee80211_state {
(((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \
(((Addr[5]) & 0xff) == 0xff))
#else
-extern __inline int is_multicast_mac_addr(const u8 *addr)
+static __inline int is_multicast_mac_addr(const u8 *addr)
{
return ((addr[0] != 0xff) && (0x01 & addr[0]));
}
-extern __inline int is_broadcast_mac_addr(const u8 *addr)
+static __inline int is_broadcast_mac_addr(const u8 *addr)
{
return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
diff --git a/drivers/net/wireless/rtl8192cu/include/ieee80211.h b/drivers/net/wireless/rtl8192cu/include/ieee80211.h
index 86e9726..950691d 100644
--- a/drivers/net/wireless/rtl8192cu/include/ieee80211.h
+++ b/drivers/net/wireless/rtl8192cu/include/ieee80211.h
@@ -1149,12 +1149,12 @@ enum ieee80211_state {
#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
#define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5]
-extern __inline int is_multicast_mac_addr(const u8 *addr)
+static __inline int is_multicast_mac_addr(const u8 *addr)
{
return ((addr[0] != 0xff) && (0x01 & addr[0]));
}
-extern __inline int is_broadcast_mac_addr(const u8 *addr)
+static __inline int is_broadcast_mac_addr(const u8 *addr)
{
return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
@@ -1177,7 +1177,7 @@ typedef struct tx_pending_t{
#define IEEE_G (1<<2)
#define IEEE_MODE_MASK (IEEE_A|IEEE_B|IEEE_G)
-extern __inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
+static __inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
{
/* Single white space is for Linksys APs */
if (essid_len == 1 && essid[0] == ' ')
@@ -1193,7 +1193,7 @@ extern __inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
return 1;
}
-extern __inline int ieee80211_get_hdrlen(u16 fc)
+static __inline int ieee80211_get_hdrlen(u16 fc)
{
int hdrlen = 24;
diff --git a/drivers/net/wireless/rtl8723as/include/ieee80211.h b/drivers/net/wireless/rtl8723as/include/ieee80211.h
index bf24c3b..f8046ee 100644
--- a/drivers/net/wireless/rtl8723as/include/ieee80211.h
+++ b/drivers/net/wireless/rtl8723as/include/ieee80211.h
@@ -1176,12 +1176,12 @@ enum ieee80211_state {
(((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \
(((Addr[5]) & 0xff) == 0xff))
#else
-extern __inline int is_multicast_mac_addr(const u8 *addr)
+static __inline int is_multicast_mac_addr(const u8 *addr)
{
return ((addr[0] != 0xff) && (0x01 & addr[0]));
}
-extern __inline int is_broadcast_mac_addr(const u8 *addr)
+static __inline int is_broadcast_mac_addr(const u8 *addr)
{
return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
diff --git a/drivers/staging/rtl8712/ieee80211.h b/drivers/staging/rtl8712/ieee80211.h
index 3c0092b..1e7b55b 100644
--- a/drivers/staging/rtl8712/ieee80211.h
+++ b/drivers/staging/rtl8712/ieee80211.h
@@ -734,7 +734,7 @@ enum ieee80211_state {
#define IEEE_G (1<<2)
#define IEEE_MODE_MASK (IEEE_A|IEEE_B|IEEE_G)
-extern inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
+static inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
{
/* Single white space is for Linksys APs */
if (essid_len == 1 && essid[0] == ' ')
@@ -748,7 +748,7 @@ extern inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
return 1;
}
-extern inline int ieee80211_get_hdrlen(u16 fc)
+static inline int ieee80211_get_hdrlen(u16 fc)
{
int hdrlen = 24;
--
2.6.0.rc3