libimobiledevice / libimobiledevice-glue

A library with common code used by libraries and tools around the libimobiledevice project
GNU Lesser General Public License v2.1
86 stars 69 forks source link

cygwin compilation #30

Closed mexmer closed 1 year ago

mexmer commented 1 year ago

fixed compilation in proper way (handling hw addr according to cygwin socket.h). it does return mac address (tested on msys and cygwin)

nikias commented 1 year ago

This looks solid to me.

Merged with 6fcb8794592c8b275e615a6bc863c8c10e978174 (using a better commit message)

mexmer commented 1 year ago

@nikias there is still question, what should be actual output. on my computer, it returns VPN virtual adapter mac.

when we enumerating ethernet adapters in our software, we filter them, so only those, that have class ethernet or wifi are present, which removes lot of virtual adapters (not all, but vpn adapters are filtered out).

it would need some research and aditionl coding, if it's possible on cygwin. you replacement method for win32 can do that with simple check when you iterater trough output from GetAdaptersAddresses

    if (a->IfType != IF_TYPE_ETHERNET_CSMACD && a->IfType != IF_TYPE_IEEE80211)
        continue;