aqtion-freebsd
aqtion-freebsd copied to clipboard
Building on 13.2
Hi I just built this on FreeBSD 13.2 though I did have some initial difficulty.
In file included from aq_hw.c:38: /usr/include/sys/systm.h:426:1: error: static declaration of 'pause' follows non-static declaration pause(const char *wmesg, int timo) ^ /usr/include/unistd.h:357:6: note: previous declaration is here int pause(void);
Out of curiosity, I removed the include line for unistd.h from aq_hw.c and then tried the build again and it worked. Will this have any negative consequences or impact on the driver? It appears to be working well and doesn't crash when I try to ping out on the interface like the freebsd pkg did when I tried it through pkg install.
Doing so, builds the kernel module with int pause(void);
declared elsewhere in source.
The compiler can also be instructed to set preference for using Aquantia source vs FreeBSD standards... have forgotten the exact switches.
Similar example: This was a significant headache in older nvidia-driver releases where shifting a single #include
line in their source, to a few lines lower, resolved a number of build failures. Will leave it up to you to imagine what sort of staring at the monitor in bewilderment followed.
For a laugh: Comment out int pause from /usr/include/unistd.h
& marvel at how many folks declare their own.