ports/121837: [patch] devel/clanlib: make CL_System::get_exe_path() work
Ganael Laplanche
ganael.laplanche at martymac.com
Tue Mar 18 18:40:01 UTC 2008
>Number: 121837
>Category: ports
>Synopsis: [patch] devel/clanlib: make CL_System::get_exe_path() work
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Tue Mar 18 18:40:01 UTC 2008
>Closed-Date:
>Last-Modified:
>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 at 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:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list