Merge bitcoin/bitcoin#35658: refactor: Drop unneeded <sys/types.h> include before <ifaddrs.h>

22c328d388 refactor: Drop unneeded `<sys/types.h>` include before `<ifaddrs.h>` (Hennadii Stepanov)

Pull request description:

  Pure `getifaddrs()`/`freeifaddrs()` calls do not need any type definitions beyond those provided by `<ifaddrs.h>` itself.

  The subsequent `struct ifaddrs` processing in `netif.cpp` does not involve any symbols from `<sys/types.h>`.

  Platform-specific manual pages for reviewers' convenience:
  - https://www.man7.org/linux/man-pages/man3/getifaddrs.3.html
  - https://man.freebsd.org/cgi/man.cgi?query=getifaddrs
  - https://man.netbsd.org/getifaddrs.3
  - https://man.openbsd.org/getifaddrs.3
  - https://www.illumos.org/man/3SOCKET/getifaddrs

  Related to https://github.com/bitcoin/bitcoin/pull/34995.

ACKs for top commit:
  maflcko:
    lgtm ACK 22c328d388
  sedited:
    ACK 22c328d388

Tree-SHA512: e1d0627d12feb0f52ff45e93fa9deb3d5636e398128acb45d42c4a1779ecafcf3d98cbbf1dd7159247fdf679f15375bea919b7c63d4063c6e9e5c0255130626b
This commit is contained in:
merge-script
2026-07-06 13:56:26 +02:00
2 changed files with 0 additions and 2 deletions

View File

@@ -15,7 +15,6 @@ function(test_append_socket_library target)
endif()
set(check_socket_source "
#include <sys/types.h>
#include <ifaddrs.h>
int main() {

View File

@@ -30,7 +30,6 @@
#endif
#ifdef HAVE_IFADDRS
#include <sys/types.h>
#include <ifaddrs.h>
#endif