summaryrefslogtreecommitdiffstats
path: root/src/shared/libosmocore/src/socket.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-05-22 12:26:42 +0200
committerHarald Welte <laforge@gnumonks.org>2011-05-22 12:26:42 +0200
commit8226b8eae946c70bb7d23730029146f2cd320ad8 (patch)
treeca1b55128ca5537b980dcba1abb60c491a7b8f6e /src/shared/libosmocore/src/socket.c
parent393ddf9e79c47878e53a318f69e18a36c317bab0 (diff)
parente476442cf0e84c65565ace545f5b73602b5f0ffc (diff)
Merge commit 'e476442cf0e84c65565ace545f5b73602b5f0ffc'
Diffstat (limited to 'src/shared/libosmocore/src/socket.c')
-rw-r--r--src/shared/libosmocore/src/socket.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/shared/libosmocore/src/socket.c b/src/shared/libosmocore/src/socket.c
index bd4914fd..e053c24d 100644
--- a/src/shared/libosmocore/src/socket.c
+++ b/src/shared/libosmocore/src/socket.c
@@ -1,5 +1,7 @@
#include "../config.h"
+#ifdef HAVE_SYS_SOCKET_H
+
#include <osmocom/core/logging.h>
#include <osmocom/core/select.h>
#include <osmocom/core/socket.h>
@@ -97,7 +99,7 @@ int osmo_sock_init_sa(struct sockaddr *ss, uint16_t type,
}
static int sockaddr_equal(const struct sockaddr *a,
- const struct sockaddr *b, socklen_t len)
+ const struct sockaddr *b, unsigned int len)
{
struct sockaddr_in *sin_a, *sin_b;
struct sockaddr_in6 *sin6_a, *sin6_b;
@@ -141,3 +143,5 @@ int osmo_sockaddr_is_local(struct sockaddr *addr, socklen_t addrlen)
return 0;
}
+
+#endif /* HAVE_SYS_SOCKET_H */