blink
blink copied to clipboard
Compilation problem on NetBSD
I tried building blink on NetBSD-10.99.2/amd64, but it failed with:
In file included from /usr/include/sys/signal.h:112,
from /usr/include/signal.h:45,
from blink/blinkenlights.c:24:
./blink/linux.h:461:6: error: expected ':', ',', ';', '}' or '__attribute__' before '.' token
461 | u8 si_signo[4];
| ^~~~~~~~
I suspect because sys/siginfo.h has:
#define si_signo _info._signo
Thanks for reporting this. We shouldn't be using the si_ field name prefixes in our Linux structs. I'll push a change that updates this for si_signo and all the other ones too, which should avoid this potentially happening on other platforms too.
Thanks for looking at this.
The symbol I reported this for, si_signo, has not been changed by the commit, and the build still fails on NetBSD.
I fixed all the build errors on NetBSD using my SDF shell. I'm having trouble getting Blink to fully pass tests though. The system is returning weird errors like EPERM when calling mprotect().
Thanks. I don't know what exactly blink is doing, but NetBSD by default enables PaX MPROTECT, so pages can not be mapped writable and executable at the same time. If you need this, take a look at the official way but please note that there currently is a bug - second link includes a workaround. Does that help? If not, can you describe what you are doing?