Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 May 2019 18:10:19 +0000 (UTC)
From:      Matt Macy <mmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r347357 - head/sys/sys
Message-ID:  <201905081810.x48IAJws090127@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mmacy
Date: Wed May  8 18:10:19 2019
New Revision: 347357
URL: https://svnweb.freebsd.org/changeset/base/347357

Log:
  Enable sys/disk.h consumers to avoid pulling in networking headers.
  
  The networking headers break ZoF.

Modified:
  head/sys/sys/disk.h

Modified: head/sys/sys/disk.h
==============================================================================
--- head/sys/sys/disk.h	Wed May  8 17:46:59 2019	(r347356)
+++ head/sys/sys/disk.h	Wed May  8 18:10:19 2019	(r347357)
@@ -21,9 +21,6 @@
 #include <sys/disk_zone.h>
 #include <sys/socket.h>
 
-#include <net/if.h>
-#include <netinet/in.h>
-
 #ifdef _KERNEL
 
 #ifndef _SYS_CONF_H_
@@ -158,6 +155,10 @@ struct diocskerneldump_arg_freebsd12 {
 #define	DIOCSKERNELDUMP_FREEBSD12 \
 	_IOW('d', 144, struct diocskerneldump_arg_freebsd12)
 
+#ifndef WITHOUT_NETDUMP
+#include <net/if.h>
+#include <netinet/in.h>
+
 union kd_ip {
 	struct in_addr	in4;
 	struct in6_addr	in6;
@@ -208,5 +209,6 @@ _Static_assert(__offsetof(struct diocskerneldump_arg, 
 	/*
 	 * Get current kernel netdump configuration details for a given index.
 	 */
+#endif
 
 #endif /* _SYS_DISK_H_ */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905081810.x48IAJws090127>