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

Yuri Pankov yuri.pankov at gmail.com
Mon Jan 23 20:50:04 UTC 2012


>Number:         164420
>Category:       ports
>Synopsis:       [PATCH] devel/apr1: Fix getaddrinfo detection when built by clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 23 20:50:03 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Yuri Pankov
>Release:        FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
System: FreeBSD sirius.xvoid.org 10.0-CURRENT FreeBSD 10.0-CURRENT #2 r230135: Sun Jan 15 18:19:42 MSK
>Description:
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
>How-To-Repeat:
>Fix:

--- 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 @@
 		${APU_WRKDIR}/build/apu-conf.m4
 	${REINPLACE_CMD} -e '1 s/python/${PYTHON_VERSION}/' \
 		${APR_WRKDIR}/build/gen-build.py
+	${REINPLACE_CMD} -e 's/void main/int main/' ${APR_WRKDIR}/build/apr_network.m4
 
 run-autotools::
 	cd ${APR_WRKDIR} ; \
--- apr1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list