coova / coova-chilli

CoovaChilli is an open-source software access controller for captive portal hotspots.
Other
512 stars 258 forks source link

libxt_coova: Use constructor instead of _init() #556

Open hauke opened 1 year ago

hauke commented 1 year ago

The _init() function collides with a _init() function in crti.o. This results in the following error in OpenWrt: arc-openwrt-linux-gnu/bin/ld: libxt_coova.o: in function `_init': /lib/gcc/arc-openwrt-linux-gnu/11.3.0/crti.o:(.init+0x4): first defined here collect2: error: ld returned 1 exit status make[7]: *** [Makefile:22: libxt_coova.so] Error 1

Fix this by suing a constructor attribute instead. This function will still be called after the shared library was loaded.

Fixes: #553 Signed-off-by: Hauke Mehrtens hauke@hauke-m.de