diff --git a/usr/dummy-include/stdbool.h b/usr/dummy-include/stdbool.h new file mode 100644 index 000000000000..54ff9e9c90ac --- /dev/null +++ b/usr/dummy-include/stdbool.h @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef _STDBOOL_H +#define _STDBOOL_H + +#error "Please do not include from exported headers" + +#endif /* _STDBOOL_H */ diff --git a/usr/dummy-include/stdlib.h b/usr/dummy-include/stdlib.h new file mode 100644 index 000000000000..e8c21888e371 --- /dev/null +++ b/usr/dummy-include/stdlib.h @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef _STDLIB_H +#define _STDLIB_H + +#error "Please do not include from exported headers" + +#endif /* _STDLIB_H */ diff --git a/usr/include/Makefile b/usr/include/Makefile index fa9819e022b7..7740777b49f8 100644 --- a/usr/include/Makefile +++ b/usr/include/Makefile @@ -15,7 +15,7 @@ UAPI_CFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CFLAGS)) # USERCFLAGS might contain sysroot location for CC. UAPI_CFLAGS += $(USERCFLAGS) -override c_flags = $(UAPI_CFLAGS) -Wp,-MMD,$(depfile) -I$(objtree)/usr/include +override c_flags = $(UAPI_CFLAGS) -Wp,-MMD,$(depfile) -I $(obj) -I $(srctree)/usr/dummy-include # The following are excluded for now because they fail to build. #