diff options
author | Josef Micka | 2023-01-09 14:38:32 +0100 |
---|---|---|
committer | Nikias Bassen | 2023-01-09 16:08:38 +0100 |
commit | 6fcb8794592c8b275e615a6bc863c8c10e978174 (patch) | |
tree | 8be3826dbb3bd3ff76d33535bc88522de9639a93 /src/socket.c | |
parent | 7eaa28ea9529b69da6b1721ba3e791e7ea5e950b (diff) | |
download | libimobiledevice-glue-6fcb8794592c8b275e615a6bc863c8c10e978174.tar.gz libimobiledevice-glue-6fcb8794592c8b275e615a6bc863c8c10e978174.tar.bz2 |
Fix compilation on cygwin
Diffstat (limited to 'src/socket.c')
-rw-r--r-- | src/socket.c | 6 |
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 |