void-packages/srcpkgs/sun7i-kernel/patches/0003-fix-extern_inline.patch

199 lines
7.0 KiB
Diff

Defining a function "extern inline" or "extern __inline" makes it appear in the
object files of source files including the header multiple times. This leads to
multiply defined symbols when linking. Remove then "extern" where appropriate.
--- drivers/net/wireless/rtl8188eu/include/ieee80211.h 2015-03-15 20:30:43.000000000 +0100
+++ drivers/net/wireless/rtl8188eu/include/ieee80211.h 2016-12-11 23:48:07.113462416 +0100
@@ -1188,12 +1188,12 @@
(((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)
+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)
+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));
--- drivers/net/wireless/rtl8189es/include/ieee80211.h 2015-03-15 20:30:43.000000000 +0100
+++ drivers/net/wireless/rtl8189es/include/ieee80211.h 2016-12-11 23:46:24.353521931 +0100
@@ -1188,12 +1188,12 @@
(((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)
+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)
+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));
--- drivers/net/wireless/rtl8192cu/include/ieee80211.h 2015-03-15 20:30:43.000000000 +0100
+++ drivers/net/wireless/rtl8192cu/include/ieee80211.h 2016-12-11 23:47:59.585466757 +0100
@@ -1149,12 +1149,12 @@
#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)
+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)
+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 @@
#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)
+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 @@
return 1;
}
-extern __inline int ieee80211_get_hdrlen(u16 fc)
+inline int ieee80211_get_hdrlen(u16 fc)
{
int hdrlen = 24;
--- drivers/net/wireless/rtl8723as/include/ieee80211.h 2015-03-15 20:30:43.000000000 +0100
+++ drivers/net/wireless/rtl8723as/include/ieee80211.h 2016-12-11 23:46:57.248502814 +0100
@@ -1176,12 +1176,12 @@
(((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)
+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)
+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));
--- drivers/staging/rtl8187se/ieee80211/ieee80211.h 2015-03-15 20:30:43.000000000 +0100
+++ drivers/staging/rtl8187se/ieee80211/ieee80211.h 2016-12-11 23:45:36.905549616 +0100
@@ -1221,7 +1221,7 @@
return ((struct ieee80211_device *)netdev_priv(dev))->priv;
}
-extern inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
+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] == ' ')
@@ -1237,7 +1237,7 @@
return 1;
}
-extern inline int ieee80211_is_valid_mode(struct ieee80211_device *ieee, int mode)
+inline int ieee80211_is_valid_mode(struct ieee80211_device *ieee, int mode)
{
/*
* It is possible for both access points and our device to support
@@ -1263,7 +1263,7 @@
return 0;
}
-extern inline int ieee80211_get_hdrlen(u16 fc)
+inline int ieee80211_get_hdrlen(u16 fc)
{
int hdrlen = 24;
@@ -1447,12 +1447,12 @@
extern const long ieee80211_wlan_frequencies[];
-extern inline void ieee80211_increment_scans(struct ieee80211_device *ieee)
+inline void ieee80211_increment_scans(struct ieee80211_device *ieee)
{
ieee->scans++;
}
-extern inline int ieee80211_get_scans(struct ieee80211_device *ieee)
+inline int ieee80211_get_scans(struct ieee80211_device *ieee)
{
return ieee->scans;
}
--- drivers/staging/rtl8192u/ieee80211/ieee80211.h 2015-03-15 20:30:43.000000000 +0100
+++ drivers/staging/rtl8192u/ieee80211/ieee80211.h 2016-12-11 23:46:10.214530167 +0100
@@ -2251,7 +2251,7 @@
return ((struct ieee80211_device *)netdev_priv(dev))->priv;
}
-extern inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
+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] == ' ')
@@ -2267,7 +2267,7 @@
return 1;
}
-extern inline int ieee80211_is_valid_mode(struct ieee80211_device *ieee, int mode)
+inline int ieee80211_is_valid_mode(struct ieee80211_device *ieee, int mode)
{
/*
* It is possible for both access points and our device to support
@@ -2293,7 +2293,7 @@
return 0;
}
-extern inline int ieee80211_get_hdrlen(u16 fc)
+inline int ieee80211_get_hdrlen(u16 fc)
{
int hdrlen = IEEE80211_3ADDR_LEN;
@@ -2579,12 +2579,12 @@
extern const long ieee80211_wlan_frequencies[];
-extern inline void ieee80211_increment_scans(struct ieee80211_device *ieee)
+inline void ieee80211_increment_scans(struct ieee80211_device *ieee)
{
ieee->scans++;
}
-extern inline int ieee80211_get_scans(struct ieee80211_device *ieee)
+inline int ieee80211_get_scans(struct ieee80211_device *ieee)
{
return ieee->scans;
}
--- drivers/staging/rtl8712/ieee80211.h 2015-03-15 20:30:43.000000000 +0100
+++ drivers/staging/rtl8712/ieee80211.h 2016-12-11 23:45:54.550539305 +0100
@@ -734,7 +734,7 @@
#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)
+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 @@
return 1;
}
-extern inline int ieee80211_get_hdrlen(u16 fc)
+inline int ieee80211_get_hdrlen(u16 fc)
{
int hdrlen = 24;