pespin has submitted this change. ( 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(-)
Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, approved
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 * @{ *