summaryrefslogtreecommitdiffstats
path: root/src/gsm/ipa.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-05-15 12:50:04 +0200
committerHarald Welte <laforge@gnumonks.org>2017-05-15 13:42:03 +0200
commit20725b9eea15720a5dbad19aac6236b86a3e34c6 (patch)
treeed76d626ab497385c903e5a7c2af1cb993b5319d /src/gsm/ipa.c
parentbfe62e5781e3ee895a44ca9ccc155ff87c42bf43 (diff)
gsm0808 + ipa: fix compilation on systems without sys/socket.h
Change-Id: I60f5d4982cd96ab29f9924ec11b46bf56fbfc346
Diffstat (limited to 'src/gsm/ipa.c')
-rw-r--r--src/gsm/ipa.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gsm/ipa.c b/src/gsm/ipa.c
index 90cf0eb6..fa6a8b0d 100644
--- a/src/gsm/ipa.c
+++ b/src/gsm/ipa.c
@@ -21,13 +21,14 @@
*
*/
+#include "config.h"
+
#include <unistd.h>
#include <stdint.h>
#include <errno.h>
#include <stdlib.h>
#include <sys/types.h>
-#include <sys/socket.h>
#include <osmocom/core/byteswap.h>
#include <osmocom/core/msgb.h>
@@ -435,6 +436,9 @@ void ipa_prepend_header(struct msgb *msg, int proto)
hh->proto = proto;
}
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+
int ipa_msg_recv(int fd, struct msgb **rmsg)
{
int rc = ipa_msg_recv_buffered(fd, rmsg, NULL);
@@ -564,6 +568,8 @@ discard_msg:
return ret;
}
+#endif /* SYS_SOCKET_H */
+
struct msgb *ipa_msg_alloc(int headroom)
{
struct msgb *nmsg;