diff --git a/Makefile.inc1 b/Makefile.inc1 index 32579bbf523..e19c2700e1b 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2063,6 +2063,15 @@ _kerberos5_bootstrap_tools= \ .ORDER: ${_kerberos5_bootstrap_tools:C/^/${_bt}-/g} .endif +# Later config(8) requires newer libnv cnvlist* API +.if ${BOOTSTRAPPING} < 1200070 +_config= \ + lib/libnv \ + usr.sbin/config +.else +_config= usr.sbin/config +.endif + ${_bt}-usr.bin/mandoc: ${_bt}-lib/libopenbsd bootstrap-tools: .PHONY @@ -2087,7 +2096,7 @@ bootstrap-tools: .PHONY ${_lex} \ usr.bin/xinstall \ ${_gensnmptree} \ - usr.sbin/config \ + ${_config} \ ${_crunchide} \ ${_crunchgen} \ ${_nmtree} \ diff --git a/usr.sbin/config/Makefile b/usr.sbin/config/Makefile index 800192e50f2..12e62bfbb49 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} +CFLAGS+= -I. -I${SRCDIR} -I${SRCTOP}/sys NO_WMISSING_VARIABLE_DECLARATIONS= diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c index 12b83e44ffd..edde07ce694 100644 --- a/usr.sbin/config/mkmakefile.c +++ b/usr.sbin/config/mkmakefile.c @@ -286,7 +286,7 @@ dump_nvlist(nvlist_t *nvl, FILE *ofp) fprintf(ofp, "\"%s=%s\\0\"\n", name, cnvlist_get_string(cookie)); - cnvlist_free_string(nvl, cookie); + cnvlist_free_string(cookie); } }