From e5a56eba6c486523a68586c94e5fbf32927dd9d6 Mon Sep 17 00:00:00 2001 From: kevans Date: Fri, 6 Jul 2018 11:23:14 +0000 Subject: [PATCH] config(8): Fix broken ABI r336019 introduced ${SRCTOP}/sys to the include paths in order to pull in a new sys/{c,}nv.h. This is wrong, because the build tree's ABI isn't guaranteed to match what's running on the host system. Fix instead by removing -I${SRCTOP}/sys and installing the libnv headers with `make -C lib/libnv includes`... this may or may not get re-worked in the future so that a userland lib isn't installing includes from sys/. Reported by: bdrewery --- lib/libnv/Makefile | 3 +++ usr.sbin/config/Makefile | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/libnv/Makefile b/lib/libnv/Makefile index 6bba1f78a713..26df47809ce2 100644 --- a/lib/libnv/Makefile +++ b/lib/libnv/Makefile @@ -17,6 +17,9 @@ SRCS+= msgio.c SRCS+= nvlist.c SRCS+= nvpair.c +INCSDIR= ${INCLUDEDIR}/sys +INCS= ${SRCTOP}/sys/sys/cnv.h ${SRCTOP}/sys/sys/nv.h + HAS_TESTS= SUBDIR.${MK_TESTS}+= tests diff --git a/usr.sbin/config/Makefile b/usr.sbin/config/Makefile index 12e62bfbb497..800192e50f26 100644 --- a/usr.sbin/config/Makefile +++ b/usr.sbin/config/Makefile @@ -14,7 +14,7 @@ kernconf.c: kernconf.tmpl ${FILE2C} 'char kernconfstr[] = {' ',0};' < \ ${SRCDIR}/kernconf.tmpl > kernconf.c -CFLAGS+= -I. -I${SRCDIR} -I${SRCTOP}/sys +CFLAGS+= -I. -I${SRCDIR} NO_WMISSING_VARIABLE_DECLARATIONS=