diff options
author | ng0 <ng0@n0.is> | 2019-11-20 13:28:01 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-11-20 13:28:01 +0000 |
commit | 13226e828c6b7d56c77444afe159c1ccf008d62d (patch) | |
tree | 012f078ef372530f02e2ff04e7b8e2cd0149c9e4 /src/util | |
parent | 522a4b35a04b2bc8f50b25db8b9a30ef4ab9d9e2 (diff) | |
download | gnunet-13226e828c6b7d56c77444afe159c1ccf008d62d.tar.gz gnunet-13226e828c6b7d56c77444afe159c1ccf008d62d.zip |
follow-up to 7c14b80a011e9e99b1cef0bfd96bae364edd5663:
use __linux__ instead of redefined LINUX.
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/disk.c | 2 | ||||
-rw-r--r-- | src/util/gnunet-service-resolver.c | 2 | ||||
-rw-r--r-- | src/util/network.c | 2 | ||||
-rw-r--r-- | src/util/os_installation.c | 6 | ||||
-rw-r--r-- | src/util/test_bio.c | 4 |
5 files changed, 8 insertions, 8 deletions
diff --git a/src/util/disk.c b/src/util/disk.c index 866dbc301..2d5e353c8 100644 --- a/src/util/disk.c +++ b/src/util/disk.c | |||
@@ -1505,7 +1505,7 @@ GNUNET_DISK_file_sync (const struct GNUNET_DISK_FileHandle *h) | |||
1505 | return GNUNET_SYSERR; | 1505 | return GNUNET_SYSERR; |
1506 | } | 1506 | } |
1507 | 1507 | ||
1508 | #if ! defined(LINUX) || ! defined(GNU) | 1508 | #if ! defined(__linux__) || ! defined(GNU) |
1509 | return fsync (h->fd) == -1 ? GNUNET_SYSERR : GNUNET_OK; | 1509 | return fsync (h->fd) == -1 ? GNUNET_SYSERR : GNUNET_OK; |
1510 | #else | 1510 | #else |
1511 | return fdatasync (h->fd) == -1 ? GNUNET_SYSERR : GNUNET_OK; | 1511 | return fdatasync (h->fd) == -1 ? GNUNET_SYSERR : GNUNET_OK; |
diff --git a/src/util/gnunet-service-resolver.c b/src/util/gnunet-service-resolver.c index c82a18ab8..357453da7 100644 --- a/src/util/gnunet-service-resolver.c +++ b/src/util/gnunet-service-resolver.c | |||
@@ -1362,7 +1362,7 @@ GNUNET_SERVICE_MAIN ( | |||
1362 | GNUNET_MQ_handler_end ()); | 1362 | GNUNET_MQ_handler_end ()); |
1363 | 1363 | ||
1364 | 1364 | ||
1365 | #if defined(LINUX) && defined(__GLIBC__) | 1365 | #if defined(__linux__) && defined(__GLIBC__) |
1366 | #include <malloc.h> | 1366 | #include <malloc.h> |
1367 | 1367 | ||
1368 | /** | 1368 | /** |
diff --git a/src/util/network.c b/src/util/network.c index 2b407d97c..52ae3d2c7 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 | #if __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 7aa4d1254..846ceeeec 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 | #if __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 | #if __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 | #if __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 8ff93c168..13ae1cf56 100644 --- a/src/util/test_bio.c +++ b/src/util/test_bio.c | |||
@@ -200,7 +200,7 @@ test_bigmeta_rw () | |||
200 | static int | 200 | static int |
201 | test_directory_r () | 201 | test_directory_r () |
202 | { | 202 | { |
203 | #if LINUX | 203 | #if __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; |
@@ -244,7 +244,7 @@ test_nullfile_rw () | |||
244 | static int | 244 | static int |
245 | test_fullfile_rw () | 245 | test_fullfile_rw () |
246 | { | 246 | { |
247 | #ifdef LINUX | 247 | #ifdef __linux__ |
248 | /* /dev/full only seems to exist on Linux */ | 248 | /* /dev/full only seems to exist on Linux */ |
249 | char *msg; | 249 | char *msg; |
250 | int64_t testNum; | 250 | int64_t testNum; |