diff options
author | ng0 <ng0@n0.is> | 2019-11-20 14:53:33 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-11-20 14:53:33 +0000 |
commit | c4eb7c3e2afd631fa83f3d21555829178a5e10c1 (patch) | |
tree | b56ef598e649be4a5b412503940f6d9394c685ad /src/util/os_installation.c | |
parent | 13226e828c6b7d56c77444afe159c1ccf008d62d (diff) | |
download | gnunet-c4eb7c3e2afd631fa83f3d21555829178a5e10c1.tar.gz gnunet-c4eb7c3e2afd631fa83f3d21555829178a5e10c1.zip |
use ifdef instead of if for __linux__ and BSD
Diffstat (limited to 'src/util/os_installation.c')
-rw-r--r-- | src/util/os_installation.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/os_installation.c b/src/util/os_installation.c index 846ceeeec..990acede4 100644 --- a/src/util/os_installation.c +++ b/src/util/os_installation.c | |||
@@ -134,7 +134,7 @@ GNUNET_OS_init (const struct GNUNET_OS_ProjectData *pd) | |||
134 | } | 134 | } |
135 | 135 | ||
136 | 136 | ||
137 | #if __linux__ | 137 | #ifdef __linux__ |
138 | /** | 138 | /** |
139 | * Try to determine path by reading /proc/PID/exe | 139 | * Try to determine path by reading /proc/PID/exe |
140 | * | 140 | * |
@@ -383,7 +383,7 @@ os_get_gnunet_path () | |||
383 | 383 | ||
384 | if (NULL != (ret = get_path_from_GNUNET_PREFIX ())) | 384 | if (NULL != (ret = get_path_from_GNUNET_PREFIX ())) |
385 | return ret; | 385 | return ret; |
386 | #if __linux__ | 386 | #ifdef __linux__ |
387 | if (NULL != (ret = get_path_from_proc_maps ())) | 387 | if (NULL != (ret = get_path_from_proc_maps ())) |
388 | return ret; | 388 | return ret; |
389 | /* try path *first*, before /proc/exe, as /proc/exe can be wrong */ | 389 | /* try path *first*, before /proc/exe, as /proc/exe can be wrong */ |
@@ -421,7 +421,7 @@ os_get_exec_path () | |||
421 | { | 421 | { |
422 | char *ret = NULL; | 422 | char *ret = NULL; |
423 | 423 | ||
424 | #if __linux__ | 424 | #ifdef __linux__ |
425 | if (NULL != (ret = get_path_from_proc_exe ())) | 425 | if (NULL != (ret = get_path_from_proc_exe ())) |
426 | return ret; | 426 | return ret; |
427 | #endif | 427 | #endif |