Skip to content

Commit

Permalink
Fix compilation on cygwin
Browse files Browse the repository at this point in the history
  • Loading branch information
mexmer authored and nikias committed Jan 9, 2023
1 parent 7eaa28e commit 6fcb879
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6fcb879

Please sign in to comment.