[ntp:questions] Re: OpenBSD NTP compile problem

Danny Mayer mayer at gis.net
Wed Nov 26 22:40:07 UTC 2003


howard at rumba.ee.ualberta.ca (Walt Howard) wrote in message news:<bq2nr5$mju$1 at rumba.ee.ualberta.ca>...
> In article <uPWdneGSwoXtJV6iRVn-sQ at dls.net>,
> Brendan Hoffmann  <bthammy at netscape.com> wrote:
> >Hey guys, I keep getting this error upon compiling (full ouput):
> >
> >Making all in scripts
> >Making all in include
> >Making all in isc
> >Making all in ElectricFence
> >Making all in libntp
> >source='systime.c' object='systime.o' libtool=no 
> >depfile='.deps/systime.Po' tmpdepfile='.deps/systime.TPo'  depmode=gcc 
> >/bin/sh ../depcomp  gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include 
> >-I../include   -I/usr/include  -g -O2 -Wall -Wcast-qual 
> >-Wmissing-prototypes -Wpointer-arith -Wshadow -Wstrict-prototypes -c 
> >`test -f 'systime.c' || echo './'`systime.c
> >In file included from ../include/ntp_fp.h:10,
> >                  from systime.c:8:
> >../include/ntp_rfc2553.h:177: redefinition of `struct sockaddr_storage'
> >In file included from /usr/include/netinet/in.h:502,
> >                  from ../include/ntp_fp.h:11,
> >                  from systime.c:8:
> >/usr/include/netinet6/in6.h:116: redefinition of `struct in6_addr'
> >/usr/include/netinet6/in6.h:139: redefinition of `struct sockaddr_in6'
> >*** Error code 1
> >
> >Stop in /home/brendan/ntp-4.2.0/libntp.
> >*** Error code 1
> >
> >Stop in /home/brendan/ntp-4.2.0 (line 321 of Makefile).
> >*** Error code 1
> >
> >Stop in /home/brendan/ntp-4.2.0 (line 260 of Makefile).
> >
> The basic problem, which you can see if you look at the patches for the
> version of ntpd in /usr/ports/net/ntp, is that include/ntp_rfc2553.h
> defines a bunch of stuff for IPv6 which (in *BSD) was already defined
> by <netinet/in.h>.  OpenBSD patches have been dealing with this by
> deleting the "#include "ntp_rfc2553.h" from any source file that has it,
> and that continues to be an effective patch for 4.2.0.
> 
> As Danny Mayer points out in a later posting, the development version is
> getting a better test in ntp_rfc2553.h for determining how much of the
> contents are really needed on any given system.  Unless you are
> comfortable dealing with the development version, I would recommend
> copying the effect of the patches provided in /usr/ports/net/ntp/devel/patches.
> They don't apply exactly, and the one for ntp_io.c is not needed any more,
> but I found that using them got me a version of the ntp programs that
> compiles and works on OpenBSD 3.4.

If you replace the test in ntp_rfc2553.h for size with one for
ISC_PLATFORM_HAVEIPV6 it should build properly.

Danny



More information about the questions mailing list