Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jan 2012 00:42:46 +0400 (MSK)
From:      Yuri Pankov <yuri.pankov@gmail.com>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        apache@freebsd.org
Subject:   [PATCH] devel/apr1: Fix getaddrinfo detection when built by clang
Message-ID:  <201201232042.q0NKgkWX096270@sirius.xvoid.org>

next in thread | raw e-mail | index | archive | help

>Submitter-Id:	current-users
>Originator:	Yuri Pankov
>Organization:	
>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
>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@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 ---




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201232042.q0NKgkWX096270>