From 52479ecf58fa89190e384edcf838fecccc786af5 Mon Sep 17 00:00:00 2001 From: Ned Bass Date: Fri, 14 Nov 2014 10:18:05 -0800 Subject: Remove compat includes from sys/types.h Don't include the compatibility code in linux/*_compat.h in the public header sys/types.h. This causes problems when an external code base includes the ZFS headers and has its own conflicting compatibility code. Lustre, in particular, defined SHRINK_STOP for compatibility with pre-3.12 kernels in a way that conflicted with the SPL's definition. Because Lustre ZFS OSD includes ZFS headers it fails to build due to a '"SHRINK_STOP" redefined' compiler warning. To avoid such conflicts only include the compat headers from .c files or private headers. Also, for consistency, include sys/*.h before linux/*.h then sort by header name. Signed-off-by: Ned Bass Signed-off-by: Brian Behlendorf Closes #411 --- module/spl/spl-generic.c | 1 + 1 file changed, 1 insertion(+) (limited to 'module/spl/spl-generic.c') diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index ecfb663de..803f03a85 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -39,6 +39,7 @@ #include #include #include +#include #include char spl_version[32] = "SPL v" SPL_META_VERSION "-" SPL_META_RELEASE; -- cgit v1.2.3