nikp123 / wake-on-arp

An commandline daemon that wakes up a device on the local network when accessed
GNU General Public License v3.0
74 stars 4 forks source link

Update main.c so wake-on-arp can compile on clang 17 #20

Closed tgorgdotcom closed 11 months ago

tgorgdotcom commented 11 months ago

This fixed compiling on clang 17 on termux (Android arm)

tgorgdotcom commented 11 months ago

I also just found that you'll need to do the following to make it work in Termux as well (but I don't think it needs code changes):

Before you compile:

I'm running into a "socket error: Bad file descriptor" when trying to run wake-on-arp as normal, but I'm looking into it

nikp123 commented 11 months ago

I'm running into a "socket error: Bad file descriptor" when trying to run wake-on-arp as normal, but I'm looking into it

I think you might need root permissions due to the whole "listening to the entire network on your device". Try with those and report back

PS: I'll look into the change in a sec, seems fine but better make sure that it works, thanks.

tgorgdotcom commented 11 months ago

Yup, you were right. I switched to a rooted phone that had termux and it worked! Thanks for your help.