Skip to content

Commit 7a0cad8

Browse files
haukeksacilotto
authored andcommitted
wireless: Use linux/stddef.h instead of stddef.h
BugLink: https://bugs.launchpad.net/bugs/1908562 commit 1b9ae0c upstream. When compiling inside the kernel include linux/stddef.h instead of stddef.h. When I compile this header file in backports for power PC I run into a conflict with ptrdiff_t. I was unable to reproduce this in mainline kernel. I still would like to fix this problem in the kernel. Fixes: 6989310 ("wireless: Use offsetof instead of custom macro.") Signed-off-by: Hauke Mehrtens <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Kamal Mostafa <[email protected]> Signed-off-by: Ian May <[email protected]>
1 parent 29d5806 commit 7a0cad8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

include/uapi/linux/wireless.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@
7474
#include <linux/socket.h> /* for "struct sockaddr" et al */
7575
#include <linux/if.h> /* for IFNAMSIZ and co... */
7676

77-
#include <stddef.h> /* for offsetof */
77+
#ifdef __KERNEL__
78+
# include <linux/stddef.h> /* for offsetof */
79+
#else
80+
# include <stddef.h> /* for offsetof */
81+
#endif
7882

7983
/***************************** VERSION *****************************/
8084
/*

0 commit comments

Comments
 (0)