summaryrefslogtreecommitdiff
path: root/usr/include
diff options
context:
space:
mode:
Diffstat (limited to 'usr/include')
-rw-r--r--usr/include/Makefile4
-rwxr-xr-xusr/include/headers_check.pl9
2 files changed, 6 insertions, 7 deletions
diff --git a/usr/include/Makefile b/usr/include/Makefile
index f02f41941b60..61a7dd4fc05f 100644
--- a/usr/include/Makefile
+++ b/usr/include/Makefile
@@ -80,12 +80,12 @@ always-y := $(patsubst $(obj)/%.h,%.hdrtest, $(shell find $(obj) -name '*.h' 2>/
# Include the header twice to detect missing include guard.
quiet_cmd_hdrtest = HDRTEST $<
cmd_hdrtest = \
- $(CC) $(c_flags) -fsyntax-only -x c /dev/null \
+ $(CC) $(c_flags) -fsyntax-only -Werror -x c /dev/null \
$(if $(filter-out $(no-header-test), $*.h), -include $< -include $<); \
$(PERL) $(src)/headers_check.pl $(obj) $<; \
touch $@
-$(obj)/%.hdrtest: $(obj)/%.h FORCE
+$(obj)/%.hdrtest: $(obj)/%.h $(src)/headers_check.pl FORCE
$(call if_changed_dep,hdrtest)
# Since GNU Make 4.3, $(patsubst $(obj)/%/,%,$(wildcard $(obj)/*/)) works.
diff --git a/usr/include/headers_check.pl b/usr/include/headers_check.pl
index 2b70bfa5558e..21c2fb9520e6 100755
--- a/usr/include/headers_check.pl
+++ b/usr/include/headers_check.pl
@@ -74,6 +74,7 @@ sub check_declarations
printf STDERR "$filename:$lineno: " .
"userspace cannot reference function or " .
"variable defined in the kernel\n";
+ $ret = 1;
}
}
@@ -98,9 +99,8 @@ sub check_asm_types
if ($line =~ m/^\s*#\s*include\s+<asm\/types.h>/) {
$linux_asm_types = 1;
printf STDERR "$filename:$lineno: " .
- "include of <linux/types.h> is preferred over <asm/types.h>\n"
- # Warn until headers are all fixed
- #$ret = 1;
+ "include of <linux/types.h> is preferred over <asm/types.h>\n";
+ $ret = 1;
}
}
@@ -160,7 +160,6 @@ sub check_sizetypes
"found __[us]{8,16,32,64} type " .
"without #include <linux/types.h>\n";
$linux_types = 2;
- # Warn until headers are all fixed
- #$ret = 1;
+ $ret = 1;
}
}