summaryrefslogtreecommitdiffstats
path: root/kdesktop/lock
diff options
context:
space:
mode:
Diffstat (limited to 'kdesktop/lock')
-rw-r--r--kdesktop/lock/main.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/kdesktop/lock/main.cc b/kdesktop/lock/main.cc
index d35c86957..c5993f4ac 100644
--- a/kdesktop/lock/main.cc
+++ b/kdesktop/lock/main.cc
@@ -332,9 +332,11 @@ int main( int argc, char **argv )
char fullpath[PATH_MAX];
#if defined(__dilos__)
snprintf(procpath, sizeof(procpath), "/proc/%d/path/a.out", pid);
-#else /* !__dilos__ */
+#elif defined(__FreeBSD__) || defined (__DragonFly__)
+ snprintf(procpath, sizeof(procpath), "/compat/linux/proc/%d/exe", pid);
+#else /* Linux way as default */
snprintf(procpath, sizeof(procpath), "/proc/%d/exe", pid);
-#endif /* __dilos__ */
+#endif
len = readlink( procpath, fullpath, sizeof(fullpath) );
if (len >= 0) {
fullpath[len] = 0;