git: c2426723394b - main - Fix sconfig(8) build.

From: Gleb Smirnoff <glebius_at_FreeBSD.org>
Date: Fri, 22 Oct 2021 20:30:48 UTC
The branch main has been updated by glebius:

URL: https://cgit.FreeBSD.org/src/commit/?id=c2426723394ba9ab8ffa0d69bd132af1aaa2ea12

commit c2426723394ba9ab8ffa0d69bd132af1aaa2ea12
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2021-10-22 20:28:44 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2021-10-22 20:28:44 +0000

    Fix sconfig(8) build.
    
    Missed that since sconfig(8) was built on i386 only. Since I enabled
    cp(4) on amd64, enable sconfig(8) as well.
    
    Fixes:  6aae3517ed25
---
 sbin/Makefile          | 4 ----
 sbin/Makefile.amd64    | 1 +
 sbin/sconfig/Makefile  | 2 +-
 sbin/sconfig/sconfig.c | 5 +----
 4 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/sbin/Makefile b/sbin/Makefile
index ade73fc8b0ee..b4da58680458 100644
--- a/sbin/Makefile
+++ b/sbin/Makefile
@@ -93,10 +93,6 @@ SUBDIR.${MK_TESTS}+=	tests
 
 SUBDIR_PARALLEL=
 
-# Add architecture-specific manpages
-# to be included anyway
-MAN=   sconfig/sconfig.8
-
 .include <bsd.prog.mk>
 
 .include <bsd.subdir.mk>
diff --git a/sbin/Makefile.amd64 b/sbin/Makefile.amd64
index 2d231b0cb2b0..4135c44082c9 100644
--- a/sbin/Makefile.amd64
+++ b/sbin/Makefile.amd64
@@ -2,3 +2,4 @@
 
 SUBDIR += bsdlabel
 SUBDIR += fdisk
+SUBDIR += sconfig
diff --git a/sbin/sconfig/Makefile b/sbin/sconfig/Makefile
index bce914f40868..96fb46434d7a 100644
--- a/sbin/sconfig/Makefile
+++ b/sbin/sconfig/Makefile
@@ -4,7 +4,7 @@
 PACKAGE=runtime
 PROG=	sconfig
 MAN=	sconfig.8
-MANSUBDIR= /i386
 WARNS?=	2
+CFLAGS+=	-I${SRCTOP}/sys/dev/cp
 
 .include <bsd.prog.mk>
diff --git a/sbin/sconfig/sconfig.c b/sbin/sconfig/sconfig.c
index eebf6013e167..48363036e412 100644
--- a/sbin/sconfig/sconfig.c
+++ b/sbin/sconfig/sconfig.c
@@ -29,10 +29,7 @@ __FBSDID("$FreeBSD$");
 #include <ctype.h>
 #include <sys/ioctl.h>
 #include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/socket.h>
-#include <net/if.h>
-#include <machine/cserial.h>
+#include "cserial.h"
 
 #define MAXCHAN 128