coova-chilli: Fix compile problem with _init()
authorHauke Mehrtens <hauke@hauke-m.de>
Mon, 15 Aug 2022 14:00:31 +0000 (16:00 +0200)
committerRosen Penev <rosenp@gmail.com>
Sun, 21 Aug 2022 02:25:17 +0000 (19:25 -0700)
commit55297e45c85d0ab3ba31e413c0c58729cddbf72f
tree7d0c380c26b725f9c6d20c3e4dc77b72c4a27c19
parentc5ec5c70b3bcb053fea8441f028dfac0c3a18d56
coova-chilli: Fix compile problem with _init()

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.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
net/coova-chilli/patches/020-libxt_coova-Use-constructor-instead-of-_init.patch [new file with mode: 0644]