mac80211: Update to version 5.7.5-1
[openwrt/staging/hauke.git] / package / kernel / mac80211 / patches / subsys / 090-wireless-Use-linux-stddef.h-instead-of-stddef.h.patch
1 From e1f04bf9d38633f0bf9d041089366fea0ad22623 Mon Sep 17 00:00:00 2001
2 From: Hauke Mehrtens <hauke@hauke-m.de>
3 Date: Thu, 21 May 2020 19:50:05 +0200
4 Subject: [PATCH] wireless: Use linux/stddef.h instead of stddef.h
5
6 When compiling inside the kernel include linux/stddef.h instead of
7 stddef.h. When I compile this header file in backports for power PC I
8 run into a conflict with ptrdiff_t. I was unable to reproduce this in
9 mainline kernel. I still would like to fix this problem in the kernel.
10
11 Fixes: 6989310f5d43 ("wireless: Use offsetof instead of custom macro.")
12 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
13 ---
14 include/uapi/linux/wireless.h | 6 +++++-
15 1 file changed, 5 insertions(+), 1 deletion(-)
16
17 --- a/include/uapi/linux/wireless.h
18 +++ b/include/uapi/linux/wireless.h
19 @@ -74,7 +74,11 @@
20 #include <linux/socket.h> /* for "struct sockaddr" et al */
21 #include <linux/if.h> /* for IFNAMSIZ and co... */
22
23 -#include <stddef.h> /* for offsetof */
24 +#ifdef __KERNEL__
25 +# include <linux/stddef.h> /* for offsetof */
26 +#else
27 +# include <stddef.h> /* for offsetof */
28 +#endif
29
30 /***************************** VERSION *****************************/
31 /*