Mailing List Archive

nessus-libraries fails to detect netinet/udp.h
Hi,

I just tried to compile nessus pulled from CVS and failed. Reason is
that my system (Debian/i386 unstable, glibc-2.2.5) does not have
/usr/include/netinet/ip_var.h and therefore does not detect the
(existing and needed) /usr/include/netinet/udp.h

Here is the relevant part of nessus_libraries/config.log:

configure:8509: checking for netinet/udp.h
configure:8526: gcc -pipe -c -g -O2 conftest.c >&5
configure:8517:28: netinet/ip_var.h: No such file or directory
configure:8529: $? = 1
configure: failed program was:
#line 8514 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <netinet/in.h>
#include <netinet/ip_var.h>
#include <netinet/udp.h>
#include <netinet/tcp.h>

#include <netinet/udp.h>
configure:8545: result: no

The problem mainfests itself when trying to compile libnasl/nasl/udp.c

--nk
Re: nessus-libraries fails to detect netinet/udp.h [ In reply to ]
Norbert Kiesel <nkiesel@tbdnetworks.com> writes:

> I just tried to compile nessus pulled from CVS and failed. Reason is
> that my system (Debian/i386 unstable, glibc-2.2.5) does not have
> /usr/include/netinet/ip_var.h and therefore does not detect the
> (existing and needed) /usr/include/netinet/udp.h

??
I don't have netinet/ip_var.h either
RE: nessus-libraries fails to detect netinet/udp.h [ In reply to ]
Hi,

autoconf-2.5x now tries to check the usability of the header files by compiling them.
It does not rely on the preprocessor alone anymore.

I added checks to configure.in to check for the headers needed for my solaris box.
ip_var.h is needed here to compile netinet/ip.h and others.

# find /usr/include -name ip_var.h -print
/usr/include/netinet/ip_var.h
# uname -a
SunOS xxx 5.6 Generic_105181-32 sun4u sparc SUNW,Ultra-1

Here is the patch that checks for ip_var.h and uses 'ifdef' to include it only if 'sun' is defined:

# diff -c configure.in20020717 configure.in
*** configure.in20020717 Wed Jul 17 09:08:45 2002
--- configure.in Wed Jul 17 09:57:16 2002
***************
*** 277,285 ****
--- 277,290 ----
#include <netinet/in_systm.h>
#include <netinet/in.h>
#include <netinet/ip.h>])
+ AC_CHECK_HEADERS(netinet/ip_var.h,,,[#include <sys/types.h>
+ #include <netinet/in_systm.h>
+ #include <netinet/in.h>])
AC_CHECK_HEADERS(netinet/ip.h netinet/udp.h netinet/protocols.h netinet/ip_udp.h netinet/ip_tcp.h netinet/tcpip.h ,,,[.#include <sys/types.h>
#include <netinet/in.h>
+ #ifdef sun
#include <netinet/ip_var.h>
+ #endif
#include <netinet/udp.h>
#include <netinet/tcp.h>])
AC_CHECK_HEADERS(sys/socket.h)
#

Ask the autoconf guys whether this is the best way to do it...
Use automake to make your life interessting :-)

have fun,

Axel



> -----Original Message-----
> From: Michel Arboi [mailto:arboi@noos.fr]
> Sent: Wednesday, July 17, 2002 2:03 AM
> To: Nessus Development
> Subject: Re: nessus-libraries fails to detect netinet/udp.h
>
>
> Norbert Kiesel <nkiesel@tbdnetworks.com> writes:
>
> > I just tried to compile nessus pulled from CVS and failed.
> Reason is
> > that my system (Debian/i386 unstable, glibc-2.2.5) does not have
> > /usr/include/netinet/ip_var.h and therefore does not detect the
> > (existing and needed) /usr/include/netinet/udp.h
>
> ??
> I don't have netinet/ip_var.h either
>
Re: nessus-libraries fails to detect netinet/udp.h [ In reply to ]
On Wed, Jul 17, 2002 at 10:03:57AM +0200, Nennker, Axel wrote:
> Hi,
>
> autoconf-2.5x now tries to check the usability of the header files by compiling them.
> It does not rely on the preprocessor alone anymore.

I think I'll revert back to autoconf-2.13. The new versions produces
scripts which work less well and which twice as long to finish...



-- Renaud