Open rpranshu opened 5 years ago
on Mac OS Mojave 10.14.2 I face the same issue.
[ 11%] Building C object src/CMakeFiles/netdiscover.dir/ifaces.c.o
/Users//Tools/netdiscover/src/ifaces.c:207:20: error: use of undeclared identifier 'SIOCGIFHWADDR'
if (ioctl(fd,SIOCGIFHWADDR,&ifr)==-1) {
^
/Users//Tools/netdiscover/src/ifaces.c:215:15: error: no member named 'ifr_hwaddr' in 'struct ifreq'
if (ifr.ifr_hwaddr.sa_family!=ARPHRD_ETHER) {
~~~ ^
/Users//Tools/netdiscover/src/ifaces.c:220:46: error: no member named 'ifr_hwaddr' in 'struct ifreq'
unsigned char* mac=(unsigned char*)ifr.ifr_hwaddr.sa_data;
~~~ ^
3 errors generated.
make[2]: *** [src/CMakeFiles/netdiscover.dir/ifaces.c.o] Error 1
make[1]: *** [src/CMakeFiles/netdiscover.dir/all] Error 2
make: *** [all] Error 2
Googled a bit regarding this issue. Some libraries and headers are native to linux only. So we'll have to wait for the devs to make it mac compatible
On MacOS Mojave, the build fails giving the following output
$ cmake .
$ make