use AC_LANG_SOURCE instead of AC_LANG_PROGRAM to avoid a nested function

definition
This commit is contained in:
sthen 2017-09-25 12:41:07 +00:00
parent 1e680c7e7c
commit 6780b15bfc
2 changed files with 28 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.72 2017/03/27 11:33:40 bluhm Exp $
# $OpenBSD: Makefile,v 1.73 2017/09/25 12:41:07 sthen Exp $
COMMENT= Network Time Protocol reference implementation
@ -7,6 +7,7 @@ COMMENT= Network Time Protocol reference implementation
# 'pl' for local use.
VERSION= 4.2.8p10
REVISION= 0
DISTNAME= ntp-${VERSION}
PKGNAME= ntp-${VERSION:S/p/pl/}
CATEGORIES= net
@ -25,7 +26,8 @@ WANTLIB += m pthread ssl termcap
# enabling SEPARATE_BUILD causes the parser to be rebuilt .y -> .c,
# which requires bison
CONFIGURE_STYLE= gnu
CONFIGURE_STYLE= autoconf
AUTOCONF_VERSION= 2.69
CONFIGURE_ARGS= --docdir=${TRUEPREFIX}/share/doc/ntp \
--enable-parse-clocks \

View File

@ -0,0 +1,24 @@
$OpenBSD: patch-configure_ac,v 1.4 2017/09/25 12:41:07 sthen Exp $
Index: configure.ac
--- configure.ac.orig
+++ configure.ac
@@ -962,7 +962,7 @@ case "$ac_cv_func_recvmsg" in
compiled=no
for ntp_cv_struct_iovec_help in '0' '1'; do
AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
+ [AC_LANG_SOURCE(
[[
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
@@ -973,8 +973,7 @@ case "$ac_cv_func_recvmsg" in
#if $ntp_cv_struct_iovec_help
# include <sys/uio.h>
#endif
- ]],
- [[
+
void foo(void) {
ssize_t x;
int s = 0;