From nobody@FreeBSD.org  Tue Mar 18 18:33:37 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 09A241065673
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 18 Mar 2008 18:33:37 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 0C6418FC2C
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 18 Mar 2008 18:33:37 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m2IIXa5f068967
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 18 Mar 2008 18:33:36 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m2IIXaA5068966;
	Tue, 18 Mar 2008 18:33:36 GMT
	(envelope-from nobody)
Message-Id: <200803181833.m2IIXaA5068966@www.freebsd.org>
Date: Tue, 18 Mar 2008 18:33:36 GMT
From: Ganael Laplanche <ganael.laplanche@martymac.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] devel/clanlib: make CL_System::get_exe_path() work
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: carpetsmoker@xs4all.nl

>Number:         121837
>Category:       ports
>Synopsis:       [patch] devel/clanlib: make CL_System::get_exe_path() work
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    miwi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 18 18:40:01 UTC 2008
>Closed-Date:    Wed Mar 26 12:54:12 UTC 2008
>Last-Modified:  Wed Mar 26 12:54:12 UTC 2008
>Originator:     Ganael Laplanche
>Release:        7.0-STABLE
>Organization:
http://contribs.martymac.com
>Environment:
FreeBSD home.martymac.com 7.0-STABLE FreeBSD 7.0-STABLE #10: Wed Mar 12 14:04:40 CET 2008     root@home.martymac.com:/usr/obj/usr/src/sys/MYKERNEL  amd64
>Description:
Clanlib uses Linux' /proc/self/exe to get the full path of the current running process. The attached patch uses /proc/curproc/file instead to make it work under FreeBSD.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

--- Sources/Core/System/Unix/init_linux.cpp.orig	2008-03-18 18:30:05.191894223 +0100
+++ Sources/Core/System/Unix/init_linux.cpp	2008-03-18 18:31:07.787731403 +0100
@@ -118,7 +118,7 @@
 
 #else
 	int size;
-	size = readlink("/proc/self/exe", exe_file, PATH_MAX);
+	size = readlink("/proc/curproc/file", exe_file, PATH_MAX);
 	if (size < 0)
 	{
 		throw CL_Error(strerror(errno));


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Tue Mar 18 18:40:08 UTC 2008 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=121837 
Responsible-Changed-From-To: freebsd-ports-bugs->miwi 
Responsible-Changed-By: miwi 
Responsible-Changed-When: Tue Mar 18 19:05:20 UTC 2008 
Responsible-Changed-Why:  
I'll take it. 

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

From: Martin Tournoij <carpetsmoker@xs4all.nl>
To: bug-followup@FreeBSD.org, ganael.laplanche@martymac.com
Cc:  
Subject: Re: ports/121837: [patch] devel/clanlib: make
	CL_System::get_exe_path() work
Date: Tue, 18 Mar 2008 21:16:26 +0100

 Thank you for this patch.
 
 miwi, can you commit this at the same time as ports/121829? Thank you.
 
 Regards,
 Martin Tournoij
State-Changed-From-To: feedback->closed 
State-Changed-By: miwi 
State-Changed-When: Wed Mar 26 12:54:11 UTC 2008 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=121837 
>Unformatted:
