From: Harlan Stenn Date: Thu, 3 Oct 2002 07:40:37 +0000 (-0400) Subject: Quiet GCC warnings. From Peter Breitenlohner X-Git-Tag: NTP_4_1_1C_RC1~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b05dbe9477b4fe3c3f31a1ae23fa97bdc79ab550;p=thirdparty%2Fntp.git Quiet GCC warnings. From Peter Breitenlohner bk: 3d9bf475M7Kkhn_NlvpQnaaN-kYy1g --- diff --git a/include/l_stdlib.h b/include/l_stdlib.h index ca47af86e1..89eb54535e 100644 --- a/include/l_stdlib.h +++ b/include/l_stdlib.h @@ -235,7 +235,7 @@ extern int toupper P((int)); extern int errno; #endif -#ifdef DECL_H_ERRNO +#if defined(DECL_H_ERRNO) && !defined(h_errno) extern int h_errno; #endif diff --git a/include/ntp_syscall.h b/include/ntp_syscall.h index 29dff91190..521e753f67 100644 --- a/include/ntp_syscall.h +++ b/include/ntp_syscall.h @@ -14,6 +14,7 @@ # include #endif +#ifndef NTP_SYSCALLS_LIBC #ifdef NTP_SYSCALLS_STD # define ntp_adjtime(t) syscall(SYS_ntp_adjtime, (t)) # define ntp_gettime(t) syscall(SYS_ntp_gettime, (t)) @@ -49,5 +50,6 @@ ntp_gettime( # endif # endif /* !HAVE_ADJTIMEX */ #endif /* !NTP_SYSCALLS_STD */ +#endif /* !NTP_SYSCALLS_LIBC */ #endif /* NTP_SYSCALL_H */ diff --git a/parseutil/dcfd.c b/parseutil/dcfd.c index 7d223de3cb..0ee465de05 100644 --- a/parseutil/dcfd.c +++ b/parseutil/dcfd.c @@ -108,7 +108,9 @@ #define dprintf(_x_) #endif +#ifdef DECL_ERRNO extern int errno; +#endif /* * display received data (avoids also detaching from tty) @@ -728,7 +730,7 @@ cvt_rawdcf( * convert a wall clock time description of DCF77 to a Unix time (seconds * since 1.1. 1970 UTC) */ -time_t +static time_t dcf_to_unixtime( clocktime_t *clock_time, unsigned *cvtrtc @@ -1083,7 +1085,7 @@ periodic_adjust( */ static void tick( - void + int signum ) { static unsigned long last_notice = 0; @@ -1217,7 +1219,7 @@ usage( * check_y2k() - internal check of Y2K logic * (a lot of this logic lifted from ../ntpd/check_y2k.c) */ -int +static int check_y2k( void ) { int year; /* current working year */