Skip to content
Success

Changes

Summary

  1. osmo_io.h: Avoid including sys/socket.h (details)
  2. socket.h: Include netinet/in.h instead of arpa/inet.h (details)
  3. configure.ac: Add arpa/inet.h to AC_CHECK_HEADERS (details)
Commit 95e1378c15ccb8d079f643161ac8ede94a4e7b26 by Pau Espin Pedrol
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
The file was modifiedinclude/osmocom/core/osmo_io.h
Commit 3cdd76df7da22bf32d0787657ac0cbe99e48f6df by Pau Espin Pedrol
socket.h: Include netinet/in.h instead of arpa/inet.h

In socket.h we are mainly interested in netinet/int.h, since that's the
one defining INET_ADDRSTRLEN, struct sockaddr_in, struct in_addr, ec.

Header arpa/inet.h usually defines several functions which use those,
like htonl(), inet_ntop(), etc.

See POSIX:
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/arpa_inet.h.html#tag_13_03
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/netinet_in.h.html

Change-Id: I03919c4adc962bbcfabc9030c6f12c0e10ff060c
The file was modifiedinclude/osmocom/core/socket.h
Commit 0cb313344d7927c2d3c181e0c1eefc032051926d by Pau Espin Pedrol
configure.ac: Add arpa/inet.h to AC_CHECK_HEADERS

We use arpa/inet.h in several places in the code, so it's good to look
up for presence even if it's only to debug toolchain compatibility.

Change-Id: Ib2d1fb3efb1dcb429b511698691249c257e00720
The file was modifiedconfigure.ac