git: ca1933d1c00b - main - sysutils/uschedule: fix build on non-x86

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Thu, 14 Oct 2021 01:31:18 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ca1933d1c00b733ed535caeff5812e1d40442e0b

commit ca1933d1c00b733ed535caeff5812e1d40442e0b
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2021-10-14 01:08:40 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2021-10-14 01:08:40 +0000

    sysutils/uschedule: fix build on non-x86
    
    Use GCC:
    uogetopt.c:49:2: error: 'regparm' is not valid on this platform
            attribute_regparm(2);
    
    While not correct outside of i386, GCC can compile this code.
---
 sysutils/uschedule/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sysutils/uschedule/Makefile b/sysutils/uschedule/Makefile
index b9db7fabf5f5..5e1034ce09cf 100644
--- a/sysutils/uschedule/Makefile
+++ b/sysutils/uschedule/Makefile
@@ -31,6 +31,12 @@ PLIST_FILES=	${bin:S,^,bin/,} ${bin:S,^,man/man1/,:S,$,.1.gz,} \
 
 OPTIONS_DEFINE=	DOCS
 
+.include <bsd.port.options.mk>
+
+.if ${ARCH} != amd64 && ${ARCH} != i386
+USES+=		compiler:gcc-c++11-lib
+.endif
+
 pre-build:
 	${ECHO_CMD} "${CC}" > ${WRKSRC}/src/conf-cc
 	${ECHO_CMD} "${CFLAGS}" > ${WRKSRC}/src/conf-cflags