aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/ethtool.h
diff options
context:
space:
mode:
authorPetr Vorel <petr.vorel@gmail.com>2020-12-14 19:03:21 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2020-12-15 12:13:36 -0800
commita85cbe6159ffc973e5702f70a3bd5185f8f3c38d (patch)
tree6df9cf14dc19d57a35ba32ffb732fe1abd76df3c /include/uapi/linux/ethtool.h
parentkthread_worker: document CPU hotplug handling (diff)
downloadlinux-dev-a85cbe6159ffc973e5702f70a3bd5185f8f3c38d.tar.xz
linux-dev-a85cbe6159ffc973e5702f70a3bd5185f8f3c38d.zip
uapi: move constants from <linux/kernel.h> to <linux/const.h>
and include <linux/const.h> in UAPI headers instead of <linux/kernel.h>. The reason is to avoid indirect <linux/sysinfo.h> include when using some network headers: <linux/netlink.h> or others -> <linux/kernel.h> -> <linux/sysinfo.h>. This indirect include causes on MUSL redefinition of struct sysinfo when included both <sys/sysinfo.h> and some of UAPI headers: In file included from x86_64-buildroot-linux-musl/sysroot/usr/include/linux/kernel.h:5, from x86_64-buildroot-linux-musl/sysroot/usr/include/linux/netlink.h:5, from ../include/tst_netlink.h:14, from tst_crypto.c:13: x86_64-buildroot-linux-musl/sysroot/usr/include/linux/sysinfo.h:8:8: error: redefinition of `struct sysinfo' struct sysinfo { ^~~~~~~ In file included from ../include/tst_safe_macros.h:15, from ../include/tst_test.h:93, from tst_crypto.c:11: x86_64-buildroot-linux-musl/sysroot/usr/include/sys/sysinfo.h:10:8: note: originally defined here Link: https://lkml.kernel.org/r/20201015190013.8901-1-petr.vorel@gmail.com Signed-off-by: Petr Vorel <petr.vorel@gmail.com> Suggested-by: Rich Felker <dalias@aerifal.cx> Acked-by: Rich Felker <dalias@libc.org> Cc: Peter Korsgaard <peter@korsgaard.com> Cc: Baruch Siach <baruch@tkos.co.il> Cc: Florian Weimer <fweimer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/uapi/linux/ethtool.h')
-rw-r--r--include/uapi/linux/ethtool.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index 9ca87bc73c44..cde753bb2093 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -14,7 +14,7 @@
#ifndef _UAPI_LINUX_ETHTOOL_H
#define _UAPI_LINUX_ETHTOOL_H
-#include <linux/kernel.h>
+#include <linux/const.h>
#include <linux/types.h>
#include <linux/if_ether.h>