summaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-11-20 13:28:01 +0000
committerng0 <ng0@n0.is>2019-11-20 13:28:01 +0000
commit13226e828c6b7d56c77444afe159c1ccf008d62d (patch)
tree012f078ef372530f02e2ff04e7b8e2cd0149c9e4 /src/transport
parent522a4b35a04b2bc8f50b25db8b9a30ef4ab9d9e2 (diff)
follow-up to 7c14b80a011e9e99b1cef0bfd96bae364edd5663:
use __linux__ instead of redefined LINUX.
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/gnunet-communicator-unix.c2
-rw-r--r--src/transport/gnunet-helper-transport-bluetooth.c12
-rw-r--r--src/transport/plugin_transport_tcp.c2
-rw-r--r--src/transport/plugin_transport_udp_broadcasting.c14
-rw-r--r--src/transport/plugin_transport_unix.c2
-rw-r--r--src/transport/tcp_connection_legacy.c2
-rw-r--r--src/transport/tcp_service_legacy.c4
-rw-r--r--src/transport/test_transport_api_reliability.c2
8 files changed, 20 insertions, 20 deletions
diff --git a/src/transport/gnunet-communicator-unix.c b/src/transport/gnunet-communicator-unix.c
index 2cfb802e3..58a144ecb 100644
--- a/src/transport/gnunet-communicator-unix.c
+++ b/src/transport/gnunet-communicator-unix.c
@@ -1105,7 +1105,7 @@ main (int argc, char *const *argv)
}
-#if defined(LINUX) && defined(__GLIBC__)
+#if defined(__linux__) && defined(__GLIBC__)
#include <malloc.h>
/**
diff --git a/src/transport/gnunet-helper-transport-bluetooth.c b/src/transport/gnunet-helper-transport-bluetooth.c
index 74806e630..975af7068 100644
--- a/src/transport/gnunet-helper-transport-bluetooth.c
+++ b/src/transport/gnunet-helper-transport-bluetooth.c
@@ -115,7 +115,7 @@ struct SendBuffer
char buf[MAXLINE * 2];
};
-#ifdef LINUX
+#ifdef __linux__
/**
* Devices buffer used to keep a list with all the discoverable devices in
* order to send them HELLO messages one by one when it receive a broadcast message.
@@ -567,7 +567,7 @@ check_crc_buf_osdep (const unsigned char *buf, size_t len)
/* ************** end of clone ***************** */
-#ifdef LINUX
+#ifdef __linux__
/**
* Function for assigning a port number
*
@@ -795,7 +795,7 @@ read_from_the_socket (void *sock,
return -1;
}
- #ifdef LINUX
+ #ifdef __linux__
/* Get the channel used */
int len;
struct sockaddr_rc rc_addr = { 0 };
@@ -1012,7 +1012,7 @@ mac_set (struct GNUNET_TRANSPORT_WLAN_Ieee80211Frame *taIeeeHeader,
}
-#ifdef LINUX
+#ifdef __linux__
/**
* Test if the given interface name really corresponds to a bluetooth
* device.
@@ -1117,7 +1117,7 @@ stdin_send_hw (void *cls, const struct GNUNET_MessageHeader *hdr)
}
-#ifdef LINUX
+#ifdef __linux__
/**
* Broadcast a HELLO message for peer discovery
*
@@ -1382,7 +1382,7 @@ inquiry_devices: // skip the conditions and force a inquiry for new devices
int
main (int argc, char *argv[])
{
-#ifdef LINUX
+#ifdef __linux__
struct HardwareInfos dev;
char readbuf[MAXLINE];
int maxfd;
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index ad0766af9..4cec181b0 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -1166,7 +1166,7 @@ get_server_addresses (const char *service_name,
unixpath = GNUNET_NETWORK_shorten_unixpath (unixpath);
LOG (GNUNET_ERROR_TYPE_INFO, _ ("Using `%s' instead\n"), unixpath);
}
-#ifdef LINUX
+#ifdef __linux__
abstract = GNUNET_CONFIGURATION_get_value_yesno (cfg,
"TESTING",
"USE_ABSTRACT_SOCKETS");
diff --git a/src/transport/plugin_transport_udp_broadcasting.c b/src/transport/plugin_transport_udp_broadcasting.c
index c85124b68..5e72fad09 100644
--- a/src/transport/plugin_transport_udp_broadcasting.c
+++ b/src/transport/plugin_transport_udp_broadcasting.c
@@ -41,7 +41,7 @@
#define LOG(kind, ...) GNUNET_log_from (kind, "transport-udp", __VA_ARGS__)
/* *********** Cryogenic ********** */
-#if LINUX
+#if __linux__
#include <sys/stat.h>
#include <fcntl.h>
@@ -92,7 +92,7 @@ struct BroadcastAddress
socklen_t addrlen;
-#if LINUX
+#if __linux__
/**
* Cryogenic handle.
*/
@@ -277,7 +277,7 @@ udp_ipv4_broadcast_send (void *cls)
}
}
-#if LINUX
+#if __linux__
/*
* Cryogenic
*/
@@ -359,7 +359,7 @@ udp_ipv6_broadcast_send (void *cls)
GNUNET_a2s ((const struct sockaddr *) &plugin->ipv6_multicast_address,
sizeof(struct sockaddr_in6)));
}
-#if LINUX
+#if __linux__
/*
* Cryogenic
*/
@@ -448,7 +448,7 @@ iface_proc (void *cls,
(NULL != plugin->sockv4) &&
(addrlen == sizeof(struct sockaddr_in)))
{
-#if LINUX
+#if __linux__
/*
* setup Cryogenic FD for ipv4 broadcasting
*/
@@ -503,7 +503,7 @@ iface_proc (void *cls,
}
else
{
-#if LINUX
+#if __linux__
/*
* setup Cryogenic FD for ipv6 broadcasting
*/
@@ -632,7 +632,7 @@ stop_broadcast (struct Plugin *plugin)
}
}
-#if LINUX
+#if __linux__
GNUNET_DISK_file_close (p->cryogenic_fd);
#endif
GNUNET_CONTAINER_DLL_remove (plugin->broadcast_head,
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c
index 083a1cf7f..9d3e7d354 100644
--- a/src/transport/plugin_transport_unix.c
+++ b/src/transport/plugin_transport_unix.c
@@ -1755,7 +1755,7 @@ libgnunet_plugin_transport_unix_init (void *cls)
plugin->env = env;
/* Initialize my flags */
-#ifdef LINUX
+#ifdef __linux__
plugin->is_abstract =
GNUNET_CONFIGURATION_get_value_yesno (plugin->env->cfg,
"testing",
diff --git a/src/transport/tcp_connection_legacy.c b/src/transport/tcp_connection_legacy.c
index 8eea664c4..4e8c8140d 100644
--- a/src/transport/tcp_connection_legacy.c
+++ b/src/transport/tcp_connection_legacy.c
@@ -876,7 +876,7 @@ GNUNET_CONNECTION_create_from_connect_to_unixpath (
un = GNUNET_new (struct sockaddr_un);
un->sun_family = AF_UNIX;
GNUNET_strlcpy (un->sun_path, unixpath, sizeof(un->sun_path));
-#ifdef LINUX
+#ifdef __linux__
{
int abstract;
diff --git a/src/transport/tcp_service_legacy.c b/src/transport/tcp_service_legacy.c
index 54020b642..f207863f9 100644
--- a/src/transport/tcp_service_legacy.c
+++ b/src/transport/tcp_service_legacy.c
@@ -482,7 +482,7 @@ add_unixpath (struct sockaddr **saddrs,
un = GNUNET_new (struct sockaddr_un);
un->sun_family = AF_UNIX;
GNUNET_strlcpy (un->sun_path, unixpath, sizeof(un->sun_path));
-#ifdef LINUX
+#ifdef __linux__
if (GNUNET_YES == abstract)
un->sun_path[0] = '\0';
#endif
@@ -637,7 +637,7 @@ LEGACY_SERVICE_get_server_addresses (
unixpath = GNUNET_NETWORK_shorten_unixpath (unixpath);
LOG (GNUNET_ERROR_TYPE_INFO, _ ("Using `%s' instead\n"), unixpath);
}
-#ifdef LINUX
+#ifdef __linux__
abstract = GNUNET_CONFIGURATION_get_value_yesno (cfg,
"TESTING",
"USE_ABSTRACT_SOCKETS");
diff --git a/src/transport/test_transport_api_reliability.c b/src/transport/test_transport_api_reliability.c
index d8fd2046d..058d7d8bf 100644
--- a/src/transport/test_transport_api_reliability.c
+++ b/src/transport/test_transport_api_reliability.c
@@ -89,7 +89,7 @@ get_size (unsigned int iter)
size_t ret;
ret = (iter * iter * iter);
-#ifndef LINUX
+#ifndef __linux__
/* FreeBSD/OSX etc. Unix DGRAMs do not work
* with large messages */
if (0 == strcmp ("unix", ccc->test_plugin))