summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Josef Micka2023-01-09 14:38:32 +0100
committerGravatar Nikias Bassen2023-01-09 16:08:38 +0100
commit6fcb8794592c8b275e615a6bc863c8c10e978174 (patch)
tree8be3826dbb3bd3ff76d33535bc88522de9639a93 /src
parent7eaa28ea9529b69da6b1721ba3e791e7ea5e950b (diff)
downloadlibimobiledevice-glue-6fcb8794592c8b275e615a6bc863c8c10e978174.tar.gz
libimobiledevice-glue-6fcb8794592c8b275e615a6bc863c8c10e978174.tar.bz2
Fix compilation on cygwin
Diffstat (limited to 'src')
-rw-r--r--src/socket.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/socket.c b/src/socket.c
index 1029a71..48eb831 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -742,6 +742,12 @@ LIBIMOBILEDEVICE_GLUE_API int get_primary_mac_address(unsigned char mac_addr_buf
result = 0;
break;
}
+#elif defined(__CYGWIN__)
+ if (ifa->ifa_data) {
+ memcpy(mac_addr_buf, ((struct ifaddrs_hwdata *)ifa->ifa_data)->ifa_hwaddr.sa_data, 6);
+ result = 0;
+ break;
+ }
#else
#error get_primary_mac_address is not supported on this platform.
#endif