Mikolaj Kucharski wrote:
Hi,

Can anyone give me a hint why I have errors like this

configure:31273: cc -o conftest -O2 -pipe -Wall \
        -Wmissing-prototypes -I/usr/local/include \
        -I/usr/X11R6/include -L/usr/local/lib conftest.c -lwrap >&5
/usr/lib/libwrap.so.4.0: undefined reference to `allow_severity'
/usr/lib/libwrap.so.4.0: undefined reference to `deny_severity'
collect2: ld returned 1 exit status

# grep -R allow_severity /usr/lib Binary file /usr/lib/libwrap.so.4.0 matches
Binary file /usr/lib/libwrap.a matches
Binary file /usr/lib/libwrap_p.a matches
Binary file /usr/lib/libwrap_pic.a matches

Yes, and nm /usr/lib/libwrap.so.4.0 | grep allow_severity says:

         U allow_severity

which means the symbol is referenced but not defined.

This compilation fails with sourse like this (char):

        | #ifdef __cplusplus
        | extern "C"
        | #endif
        | char hosts_ctl ();
        | int
        | main ()
        | {
        | return hosts_ctl ();
        |   ;
        |   return 0;
        | }


and also fails like this (int):


        | #ifdef __cplusplus
        | extern "C"
        | #endif
        | int hosts_ctl ();
        | int
        | main ()
        | {
        | return hosts_ctl ();
        |   ;
        |   return 0;
        | }

Which type is correct? hosts_access(3) says that return type of
hosts_ctl() is int


Read the man page for hosts_ctl(3) more carefully:

The allow_severity and deny_severity variables determine how accepted and rejected requests may be logged. They must be provided by the caller and may be modified by rules in the access control tables.

So you need to fix your tests.
--
Matthieu Herrb

Reply via email to