Date: Fri, 11 May 2018 00:01:43 +0000 (UTC) From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333475 - in head: lib/libkvm lib/libmemstat sys/sys usr.bin/systat usr.sbin/route6d usr.sbin/rtadvd Message-ID: <201805110001.w4B01hqD019430@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: des Date: Fri May 11 00:01:43 2018 New Revision: 333475 URL: https://svnweb.freebsd.org/changeset/base/333475 Log: Reduce <sys/queue.h> pollution. While <sys/sysctl.h> includes <sys/queue.h> unconditionally, it is only actually used in code which is conditional on _KERNEL. Make the #include itself conditional as well, and fix userland code that uses <sys/queue.h> for other purposes but relied on <sys/sysctl.h> to bring it in. MFC after: 1 week Modified: head/lib/libkvm/kvm_getswapinfo.c head/lib/libmemstat/memstat.c head/sys/sys/sysctl.h head/usr.bin/systat/ifstat.c head/usr.bin/systat/tcp.c head/usr.sbin/route6d/route6d.c head/usr.sbin/rtadvd/rrenum.c Modified: head/lib/libkvm/kvm_getswapinfo.c ============================================================================== --- head/lib/libkvm/kvm_getswapinfo.c Thu May 10 23:58:33 2018 (r333474) +++ head/lib/libkvm/kvm_getswapinfo.c Fri May 11 00:01:43 2018 (r333475) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include <sys/time.h> #include <sys/stat.h> #include <sys/blist.h> +#include <sys/queue.h> #include <sys/sysctl.h> #include <vm/swap_pager.h> Modified: head/lib/libmemstat/memstat.c ============================================================================== --- head/lib/libmemstat/memstat.c Thu May 10 23:58:33 2018 (r333474) +++ head/lib/libmemstat/memstat.c Fri May 11 00:01:43 2018 (r333475) @@ -29,6 +29,7 @@ */ #include <sys/param.h> +#include <sys/queue.h> #include <sys/sysctl.h> #include <err.h> Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Thu May 10 23:58:33 2018 (r333474) +++ head/sys/sys/sysctl.h Fri May 11 00:01:43 2018 (r333475) @@ -38,7 +38,9 @@ #ifndef _SYS_SYSCTL_H_ #define _SYS_SYSCTL_H_ +#ifdef _KERNEL #include <sys/queue.h> +#endif struct thread; /* Modified: head/usr.bin/systat/ifstat.c ============================================================================== --- head/usr.bin/systat/ifstat.c Thu May 10 23:58:33 2018 (r333474) +++ head/usr.bin/systat/ifstat.c Fri May 11 00:01:43 2018 (r333475) @@ -32,6 +32,7 @@ #include <sys/types.h> #include <sys/socket.h> +#include <sys/queue.h> #include <sys/sysctl.h> #include <net/if.h> #include <net/if_mib.h> Modified: head/usr.bin/systat/tcp.c ============================================================================== --- head/usr.bin/systat/tcp.c Thu May 10 23:58:33 2018 (r333474) +++ head/usr.bin/systat/tcp.c Fri May 11 00:01:43 2018 (r333475) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/types.h> #include <sys/socket.h> +#include <sys/queue.h> #include <sys/sysctl.h> #include <netinet/in.h> Modified: head/usr.sbin/route6d/route6d.c ============================================================================== --- head/usr.sbin/route6d/route6d.c Thu May 10 23:58:33 2018 (r333474) +++ head/usr.sbin/route6d/route6d.c Fri May 11 00:01:43 2018 (r333475) @@ -39,6 +39,7 @@ static const char _rcsid[] = "$KAME: route6d.c,v 1.104 #include <sys/param.h> #include <sys/file.h> #include <sys/ioctl.h> +#include <sys/queue.h> #include <sys/socket.h> #include <sys/sysctl.h> #include <sys/uio.h> Modified: head/usr.sbin/rtadvd/rrenum.c ============================================================================== --- head/usr.sbin/rtadvd/rrenum.c Thu May 10 23:58:33 2018 (r333474) +++ head/usr.sbin/rtadvd/rrenum.c Fri May 11 00:01:43 2018 (r333475) @@ -34,6 +34,7 @@ #include <sys/types.h> #include <sys/param.h> #include <sys/ioctl.h> +#include <sys/queue.h> #include <sys/socket.h> #include <sys/sysctl.h>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805110001.w4B01hqD019430>