pespin submitted this change.

View Change

Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, approved
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(-)

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 change 41927. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I5bcba8f72a2be6161d7782a3100d25a7025341d0
Gerrit-Change-Number: 41927
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: jolly <andreas@eversberg.eu>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>