head 1.1; access; symbols; locks; strict; comment @ * @; 1.1 date 2026.05.01.19.49.48; author vins; state Exp; branches; next ; commitid SwoiCvBG4ddWf9EG; desc @@ 1.1 log @misc/libimobiledevice-glue: import libimobiledevice-glue-1.3.2 from wip (Packaged in wip by wiz). Library with common code used by the libraries and tools around the libimobiledevice project. @ text @$NetBSD$ Add NetBSD support. https://github.com/libimobiledevice/libimobiledevice-glue/pull/52 --- src/socket.c.orig 2025-07-31 18:18:24.287306854 +0000 +++ src/socket.c @@@@ -56,7 +56,7 @@@@ #ifdef AF_INET6 #include #include -#if defined (__APPLE__) || defined (__FreeBSD__) || defined (__HAIKU__) +#if defined (__APPLE__) || defined (__FreeBSD__) || defined (__HAIKU__) || defined (__NetBSD__) #include #endif #ifdef __linux__ @@@@ -907,13 +907,13 @@@@ int get_primary_mac_address(unsigned cha if (ifa->ifa_flags & IFF_LOOPBACK) { continue; } -#if defined(__APPLE__) || defined (__FreeBSD__) || defined (__HAIKU__) +#if defined(__APPLE__) || defined (__FreeBSD__) || defined (__HAIKU__) || defined (__NetBSD__) if (ifa->ifa_addr->sa_family != AF_LINK) { continue; } #if defined (__APPLE__) if (!strcmp(ifa->ifa_name, "en0")) { -#elif defined (__FreeBSD__) || defined (__HAIKU__) +#elif defined (__FreeBSD__) || defined (__HAIKU__) || defined (__NetBSD__) { #endif memcpy(mac_addr_buf, (unsigned char *)LLADDR((struct sockaddr_dl *)(ifa)->ifa_addr), 6); @