Sure I can. Usually, on *.nix system, you do readlink /proc/self/exe to get the path of the current executable (ioUrbanTerror.i386). On FreeBSD with procfs, there is no /proc/self, it's called /proc/curproc. Then there is something I didn't knew: there is no exe in FreeBSD. in FreeBSD it's called file. So you need to change readlink("/proc/self/exe") to readlink("/proc/curproc/file")
Hi pse could you help me with urth hack on freebsd (x86_64) . first i need to patch code/qcommon/q_platform.h and add missing code for freebsd x86_64 architecture . after that i manage to compile urth.so /home/cross_urth]# ./compile-linux.sh In file included from main.cpp:79: os_specific.hpp: In function 'int FuncGetDetourLength(char*)': os_specific.hpp:213: warning: deprecated conversion from string constant to 'char*' In file included from main.cpp:82: fakeGUID.hpp: In function 'std::string FuncGeneratekey()': fakeGUID.hpp:502: warning: deprecated conversion from string constant to 'char*' main.cpp: In function 'void OnLoad()': main.cpp:145: warning: deprecated conversion from string constant to 'char*' [root@brzi /home/cross_urth]# but when i run LD_PRELOAD=./urth.so /path/to/ioUrbanTerror i got : [rut@brzi /home/cross_urth]$ ./run.sh Erase is backspace. readlink(): No such file or directory [rut@brzi /home/cross_urth]$ here is output of my /proc/curproc [rut@brzi /home/cross_urth]$ ls -al /proc/curproc/ total 0 dr-xr-xr-x 1 rut rut 0 Jan 14 15:15 . dr-xr-xr-x 1 root wheel 0 Jan 14 15:15 .. -r--r--r-- 1 rut rut 0 Jan 14 15:15 cmdline --w------- 1 rut rut 0 Jan 14 15:15 ctl -rw------- 1 rut rut 0 Jan 14 15:15 dbregs -r--r--r-- 1 rut rut 0 Jan 14 15:15 etype lr--r--r-- 1 rut rut 0 Jan 14 15:15 file -> /bin/ls -rw------- 1 rut rut 0 Jan 14 15:15 fpregs -r--r--r-- 1 rut rut 0 Jan 14 15:15 map -rw------- 1 rut rut 0 Jan 14 15:15 mem --w------- 1 rut rut 0 Jan 14 15:15 note --w------- 1 rut rut 0 Jan 14 15:15 notepg -rw------- 1 rut rut 0 Jan 14 15:15 osrel -rw------- 1 rut rut 0 Jan 14 15:15 regs -r--r--r-- 1 rut rut 0 Jan 14 15:15 rlimit -r--r--r-- 1 rut rut 0 Jan 14 15:15 status [rut@brzi /home/cross_urth]$ can you help me with these problem ? tnx