From jbeich@tormail.net  Mon Nov 28 11:11:06 2011
Return-Path: <jbeich@tormail.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7B749106568E
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 28 Nov 2011 11:11:06 +0000 (UTC)
	(envelope-from jbeich@tormail.net)
Received: from server2.hudsonvalleyhost.com (server2.hudsonvalleyhost.com [66.7.195.77])
	by mx1.freebsd.org (Postfix) with ESMTP id 4BE6C8FC27
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 28 Nov 2011 11:11:06 +0000 (UTC)
Received: from [95.109.103.113] (port=44402 helo=internal.tormail.net)
	by server2.hudsonvalleyhost.com with esmtpsa (TLSv1:RC4-SHA:128)
	(Exim 4.69)
	(envelope-from <jbeich@tormail.net>)
	id 1RUz72-002Fb2-Lx
	for FreeBSD-gnats-submit@freebsd.org; Mon, 28 Nov 2011 06:11:05 -0500
Received: from jbeich by internal.tormail.net with local (Exim 4.63)
	(envelope-from <jbeich@tormail.net>)
	id 1RUz6B-0001rg-15
	for FreeBSD-gnats-submit@freebsd.org; Mon, 28 Nov 2011 11:10:15 +0000
Message-Id: <1RUz6B-0001rg-15@internal.tormail.net>
Date: Mon, 28 Nov 2011 14:08:30 +0300
From: Jan Beich <jbeich@tormail.net>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [patch] devel/bglibs: unbreak build with clang

>Number:         162921
>Category:       ports
>Synopsis:       [patch] devel/bglibs: unbreak build with clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    scheidell
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 28 11:20:07 UTC 2011
>Closed-Date:    Sat Dec 03 20:31:49 UTC 2011
>Last-Modified:  Wed Feb 15 07:30:07 UTC 2012
>Originator:     Jan Beich
>Release:        FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
>Description:
hasunsetenv test fails because main() has wrong return type
>How-To-Repeat:
http://pointyhat-west.isc.freebsd.org/errorlogs/amd64-errorlogs/e.9-exp-clang.20111122163211.pointyhat-west/bglibs-1.106,1.log
>Fix:
--- clang.diff begins here ----
Index: devel/bglibs/Makefile
===================================================================
RCS file: /a/.csup/ports/devel/bglibs/Makefile,v
retrieving revision 1.41
diff -u -p -r1.41 Makefile
--- devel/bglibs/Makefile	30 May 2011 12:28:18 -0000	1.41
+++ devel/bglibs/Makefile	28 Nov 2011 11:04:09 -0000
@@ -29,4 +28,7 @@ USE_LDCONFIG=	${BGLIBS_LIB}
 MAN1=		cli-generate.1
 
+post-patch:
+	${REINPLACE_CMD} '/main/s/void/int/' ${WRKSRC}/sys/try*.c
+
 do-configure:
 	${ECHO_CMD} "${CC} ${CFLAGS}"	> ${WRKSRC}/conf-cc
--- clang.diff ends here ---
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->sylvio 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Nov 28 11:20:18 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=162921 
Responsible-Changed-From-To: sylvio->scheidell  
Responsible-Changed-By: scheidell 
Responsible-Changed-When: Sat Dec 3 19:01:17 UTC 2011 
Responsible-Changed-Why:  
i'll take it. sylvio still on leave 

http://www.freebsd.org/cgi/query-pr.cgi?pr=162921 
State-Changed-From-To: open->closed  
State-Changed-By: scheidell 
State-Changed-When: Sat Dec 3 20:31:10 UTC 2011 
State-Changed-Why:  
Committed, thanks 

http://www.freebsd.org/cgi/query-pr.cgi?pr=162921 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/162921: commit references a PR
Date: Sat,  3 Dec 2011 20:34:35 +0000 (UTC)

 scheidell    2011-12-03 20:34:21 UTC
 
   FreeBSD ports repository
 
   Modified files:
     devel/bglibs         Makefile 
   Log:
   -hasunsetenv test fails because main() has wrong return type
   
   PR:             ports/162921
   Submitted by:   Jan Beich <jbeich@tormail.net>
   Approved by:    maintainer (sylvio, implicit), gabor (mentor)
   Feature safe:   yes
   
   Revision  Changes    Path
   1.42      +4 -0      ports/devel/bglibs/Makefile
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 

From: Christopher Weimann <christopher@weimann.us>
To: bug-followup@FreeBSD.org, jbeich@tormail.net
Cc:  
Subject: Re: ports/162921: [patch] devel/bglibs: unbreak build with clang
Date: Wed, 15 Feb 2012 01:59:10 -0500

 This patch breaks at minimum the time function of bglib.
 
 The tryclockgettime.c file ( as well as many of the other try*.c files ) 
 contains "int main(void)" and this patch results in that being changed 
 to "int main(int)" which fails to compile.  That results in bglib not 
 detecting the capabilities of the platform properly.
 
>Unformatted:
