[PATCH] devel/apr1: Fix getaddrinfo detection when built by clang

Yuri Pankov yuri.pankov at gmail.com
Mon Jan 23 20:42:48 UTC 2012

>Submitter-Id:	current-users
>Originator:	Yuri Pankov
>Confidential:	no 
>Synopsis:	[PATCH] devel/apr1: Fix getaddrinfo detection when built by clang
>Severity:	non-critical
>Priority:	low
>Category:	ports 
>Class:		change-request
>Release:	FreeBSD 10.0-CURRENT amd64
System: FreeBSD sirius.xvoid.org 10.0-CURRENT FreeBSD 10.0-CURRENT #2 r230135: Sun Jan 15 18:19:42 MSK
The patch fixes getaddrinfo and friends detection when port is built by
clang by changing 'void main {...' to 'int main {...'. Clang errors on
'void main {...':

configure:27712: checking for working getaddrinfo
configure:27757: clang -o conftest -g -O2   conftest.c -lcrypt  -pthread >&5
conftest.c:209:1: error: 'main' must return 'int'

This makes using IPv6 addresses in Listen directive in www/apache22
(at least) not possible.

Port maintainer (apache at FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99

--- apr1.patch begins here ---
Index: Makefile
RCS file: /home/ncvs/ports/devel/apr1/Makefile,v
retrieving revision 1.117
diff -u -r1.117 Makefile
--- Makefile	12 Sep 2011 13:46:52 -0000	1.117
+++ Makefile	23 Jan 2012 20:35:31 -0000
@@ -217,6 +217,7 @@
 	${REINPLACE_CMD} -e '1 s/python/${PYTHON_VERSION}/' \
+	${REINPLACE_CMD} -e 's/void main/int main/' ${APR_WRKDIR}/build/apr_network.m4
 	cd ${APR_WRKDIR} ; \
--- apr1.patch ends here ---

More information about the freebsd-apache mailing list