Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions server/quick_ssdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ static void *request_handler(enum mg_event event,
return NULL;
}

#if !defined(SIOCGIFHWADDR) && defined(__APPLE__)
// see https://github.com/apple/darwin-xnu/blob/main/bsd/sys/sockio.h
#define SIOCGIFHWADDR _IOWR('i', 158, struct ifreq) /* get link level addr */
#define ifr_hwaddr ifr_addr
#endif

/**
* Returns the local hardware address (e.g. MAC address). On macOS the "en0"
* interface is used. On other platforms the first non-loopback interface is
Expand Down