summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-09-17 21:25:48 +0000
committerpeter <peter@FreeBSD.org>2001-09-17 21:25:48 +0000
commit552fcc860ecbdfd54e6371cb31c446ecbbce9ecb (patch)
tree46411914bbc9ce14eda468f015cf26812feafcb3 /usr.sbin/config
parentdb1c30ff3df0786cba40522c4f80e2b9bb4cb0cd (diff)
downloadFreeBSD-src-552fcc860ecbdfd54e6371cb31c446ecbbce9ecb.zip
FreeBSD-src-552fcc860ecbdfd54e6371cb31c446ecbbce9ecb.tar.gz
Use includes to get prototypes for hints and env arrays.
Submitted by: bde
Diffstat (limited to 'usr.sbin/config')
-rw-r--r--usr.sbin/config/mkmakefile.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c
index 29a5cb0..dda72b6 100644
--- a/usr.sbin/config/mkmakefile.c
+++ b/usr.sbin/config/mkmakefile.c
@@ -196,6 +196,7 @@ makefile(void)
(void) fclose(ofp);
moveifchanged(path("Makefile.new"), path("Makefile"));
+ /* XXX makefile() should make the Makefile, not hints.c. */
if (hints) {
ifp = fopen(hints, "r");
if (ifp == NULL)
@@ -206,6 +207,9 @@ makefile(void)
ofp = fopen(path("hints.c.new"), "w");
if (ofp == NULL)
err(1, "%s", path("hints.c.new"));
+ fprintf(ofp, "#include <sys/types.h>\n");
+ fprintf(ofp, "#include <sys/systm.h>\n");
+ fprintf(ofp, "\n");
fprintf(ofp, "int hintmode = %d;\n", hintmode);
fprintf(ofp, "char static_hints[] = {\n");
if (ifp) {
@@ -245,6 +249,7 @@ makefile(void)
fclose(ofp);
moveifchanged(path("hints.c.new"), path("hints.c"));
+ /* XXX makefile() should make the Makefile, not env.c. */
if (env) {
ifp = fopen(env, "r");
if (ifp == NULL)
@@ -255,6 +260,9 @@ makefile(void)
ofp = fopen(path("env.c.new"), "w");
if (ofp == NULL)
err(1, "%s", path("env.c.new"));
+ fprintf(ofp, "#include <sys/types.h>\n");
+ fprintf(ofp, "#include <sys/systm.h>\n");
+ fprintf(ofp, "\n");
fprintf(ofp, "int envmode = %d;\n", envmode);
fprintf(ofp, "char static_env[] = {\n");
if (ifp) {
OpenPOWER on IntegriCloud