xt_connlimit 20070707 kernel

Jan Engelhardt jengelh at computergmbh.de
Fri Jul 13 17:01:11 CEST 2007

On Jul 13 2007 23:18, Yasuyuki KOZAKAI wrote:
>> +static __attribute__((constructor)) void libipt_connlimit_init(void)
>> +{
>> +	register_match(&connlimit_reg);
>> +}
>JFYI: I've fixed compile error in the case of NO_SHARED_LIBS=1. The
>function name for initialization needs to be _init, not

Uhm, that's why there is __attribute__((constructor)). Because *having* an
_init in a shared library has often failed on me. Example:

$ cat test.c
#include <stdio.h>
void _init(void)
        printf("Hello world\n");

$ cc test.c -shared -o test.so -Wall
/tmp/ccBDCmOL.o: In function `_init':
test.c:(.text+0x0): multiple definition of `_init'
first defined here
collect2: ld returned 1 exit status

And I certainly do not want to build without the GNU runtime,
because that makes things a bit more unportable (trying to
get the right linker switch, for ex.)


More information about the netfilter-devel mailing list