aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-11-20 14:53:33 +0000
committerng0 <ng0@n0.is>2019-11-20 14:53:33 +0000
commitc4eb7c3e2afd631fa83f3d21555829178a5e10c1 (patch)
treeb56ef598e649be4a5b412503940f6d9394c685ad /src/util
parent13226e828c6b7d56c77444afe159c1ccf008d62d (diff)
downloadgnunet-c4eb7c3e2afd631fa83f3d21555829178a5e10c1.tar.gz
gnunet-c4eb7c3e2afd631fa83f3d21555829178a5e10c1.zip
use ifdef instead of if for __linux__ and BSD
Diffstat (limited to 'src/util')
-rw-r--r--src/util/network.c2
-rw-r--r--src/util/os_installation.c6
-rw-r--r--src/util/test_bio.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/util/network.c b/src/util/network.c
index 52ae3d2c7..223ce2080 100644
--- a/src/util/network.c
+++ b/src/util/network.c
@@ -962,7 +962,7 @@ GNUNET_NETWORK_socket_disable_corking (struct GNUNET_NETWORK_Handle *desc)
962{ 962{
963 int ret = 0; 963 int ret = 0;
964 964
965#if __linux__ 965#ifdef __linux__
966 int value = 0; 966 int value = 0;
967 967
968 if (0 != 968 if (0 !=
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
diff --git a/src/util/test_bio.c b/src/util/test_bio.c
index 13ae1cf56..53b45c23a 100644
--- a/src/util/test_bio.c
+++ b/src/util/test_bio.c
@@ -200,7 +200,7 @@ test_bigmeta_rw ()
200static int 200static int
201test_directory_r () 201test_directory_r ()
202{ 202{
203#if __linux__ 203#ifdef __linux__
204 char *msg; 204 char *msg;
205 char readResult[200]; 205 char readResult[200];
206 struct GNUNET_BIO_ReadHandle *fileR; 206 struct GNUNET_BIO_ReadHandle *fileR;