pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/libosmocore/+/41927?usp=email )
Change subject: osmo_io.h: Avoid including sys/socket.h
......................................................................
osmo_io.h: Avoid including sys/socket.h
sys/socket.h may not always be available (eg. arm-none-eabi toolchain).
In the header file we only really need the forward declaration of struct
msghdr, so simply do that.
Change-Id: I5bcba8f72a2be6161d7782a3100d25a7025341d0
---
M include/osmocom/core/osmo_io.h
1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/27/41927/1
diff --git a/include/osmocom/core/osmo_io.h b/include/osmocom/core/osmo_io.h
index c428191..525c23c 100644
--- a/include/osmocom/core/osmo_io.h
+++ b/include/osmocom/core/osmo_io.h
@@ -4,14 +4,16 @@
#pragma once
-#include <sys/socket.h>
-
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/logging.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/socket.h>
#include <osmocom/core/utils.h>
+/* struct msghdr is defined in sys/socket.h but that header may not be
available.
+ * We only really need a forward declaration here: */
+struct msghdr;
+
/*! \defgroup osmo_io Osmocom I/O interface
* @{
*
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41927?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I5bcba8f72a2be6161d7782a3100d25a7025341d0
Gerrit-Change-Number: 41927
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>