[ntp:questions] Re: "Can't set time of day: Interrupted system call" - who can help?

Just justestin at yahoo.com
Wed Aug 27 18:15:08 UTC 2003


Harlan Stenn <stenn at whimsy.udel.edu> wrote in message news:<o4y8xha1xf.fsf at whimsy.udel.edu>...
> It gets better.
> 
> On all of the HPUX boxes I see, configure properly auto-detects
> settimeofday().
> 
> Somebody who is actually having this problem will have to dig deeper.
> 
> H

While digging into the config.log of the last working version
(ntp-4.1.1c-rc1), I got:
configure:13667: checking for settimeofday
configure:13711: gcc -o conftest -g -O2 -Wall -Wcast-qual
-Wmissing-prototypes -Wpointer-arith -Wshadow -Wstrict-prototypes
-pipe   conftest.c -lld  >&5
configure:13785: warning: function declaration isn't a prototype
configure:13792: warning: function declaration isn't a prototype
configure:13800: warning: function declaration isn't a prototype
configure:13714: $? = 0
configure:13717: test -s conftest
configure:13720: $? = 0
configure:13731: result: yes

But, on ntp-4.1.1c-rc2 and ntp-4.1.2, I get:
configure:14834: checking for settimeofday
configure:14884: gcc -o conftest -g -O2 -Wall -Wcast-qual
-Wmissing-prototypes -Wpointer-arith -Wshadow -Wstrict-prototypes
-pipe   conftest.c -lld  >&5
configure:14955: warning: function declaration isn't a prototype
configure:14955: error: conflicting types for `settimeofday'
/usr/include/sys/time.h:541: error: previous declaration of
`settimeofday'
configure:14962: warning: function declaration isn't a prototype
configure:14970: warning: function declaration isn't a prototype
configure:14887: $? = 1
configure: failed program was:
| #line 14839 "configure"
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define STR_SYSTEM "hppa1.1-hp-hpux10.20"
| #define PACKAGE "ntp"
| #define VERSION "4.1.1c-rc2"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_UNISTD_H 1
| #define ULONG_CONST(a) a ## UL
| #define HAVE_LIBLD 1
| #define STDC_HEADERS 1
| #define HAVE_ERRNO_H 1
| #define HAVE_FCNTL_H 1
| #define HAVE_MATH_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_NETDB_H 1
| #define HAVE_POLL_H 1
| #define HAVE_RESOLV_H 1
| #define HAVE_SCHED_H 1
| #define HAVE_SGTTY_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_TERMIO_H 1
| #define HAVE_TERMIOS_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_UTMP_H 1
| #define HAVE_UTMPX_H 1
| #define HAVE_ARPA_NAMESER_H 1
| #define HAVE_NET_IF_H 1
| #define HAVE_NETINET_IN_SYSTM_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_NETINET_IP_H 1
| #define HAVE_SYS_FILE_H 1
| #define HAVE_SYS_IOCTL_H 1
| #define HAVE_SYS_LOCK_H 1
| #define HAVE_SYS_MMAN_H 1
| #define HAVE_SYS_MODEM_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_PROC_H 1
| #define HAVE_SYS_RESOURCE_H 1
| #define HAVE_SYS_SCHED_H 1
| #define HAVE_SYS_SIGNAL_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_STREAM_H 1
| #define HAVE_SYS_STROPTS_H 1
| #define HAVE_SYS_TERMIOS_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_SIGNAL_H 1
| #define HAVE_SYS_TIMERS_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define TIME_WITH_SYS_TIME 1
| #define NLIST_STRUCT 1
| #define PROTOTYPES 1
| #define STDC_HEADERS 1
| #define HAVE_STRING_H 1
| #define HAVE_PROTOTYPES 1
| #define WORDS_BIGENDIAN 1
| #define RETSIGTYPE void
| #define DEFAULT_HZ 100
| #define HAVE_SA_SIGACTION_IN_STRUCT_SIGACTION 1
| #define HAVE_STRUCT_TIMESPEC 1
| #define SIZEOF_SIGNED_CHAR 1
| #define SIZEOF_INT 4
| #define SIZEOF_LONG 4
| #define NEED_S_CHAR_TYPEDEF 1
| #define HAVE_GETCLOCK 1
| #define HAVE_GETDTABLESIZE 1
| #define HAVE_GETRUSAGE 1
| #define HAVE_GETUID 1
| #define HAVE_MEMCPY 1
| #define HAVE_MEMMOVE 1
| #define HAVE_MEMSET 1
| #define HAVE_MKSTEMP 1
| #define HAVE_MLOCKALL 1
| #define HAVE_MRAND48 1
| #define HAVE_SRAND48 1
| #define HAVE_NICE 1
| #define HAVE_NLIST 1
| #define HAVE_PLOCK 1
| #define HAVE_PUTUTLINE 1
| #define HAVE_PUTUTXLINE 1
| #define HAVE_READLINK 1
| #define HAVE_RTPRIO 1
| #define HAVE_SCHED_SETSCHEDULER 1
| #define HAVE_SETPGID 1
| #define HAVE_SETPRIORITY 1
| #define HAVE_SETSID 1
| /* end confdefs.h.  */
| /* System header to define __stub macros and hopefully few
prototypes,
|     which can conflict with char settimeofday (); below.
|     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|     <limits.h> exists even on freestanding compilers.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| /* Override any gcc2 internal prototype to avoid an error.  */
| #ifdef __cplusplus
| extern "C"
| {
| #endif
| /* We use char because int might match the return type of a gcc2
|    builtin and then its argument prototype would still apply.  */
| char settimeofday ();
| /* The GNU C library defines this for functions which it implements
|     to always fail with ENOSYS.  Some functions are actually named
|     something starting with __ and the normal name is an alias.  */
| #if defined (__stub_settimeofday) || defined (__stub___settimeofday)
| choke me
| #else
| char (*f) () = settimeofday;
| #endif
| #ifdef __cplusplus
| }
| #endif
|
| int
| main ()
| {
| return f != settimeofday;
|   ;
|   return 0;
| }
configure:14904: result: no

Both used gcc-3.3 on HPUX 10.20 and line:
/usr/include/sys/time.h:541 is
extern int settimeofday(const struct timeval *, const struct timezone
*);



More information about the questions mailing list