Subject: lib/10346: `struct itimerspec' is declared in but not defined
To: None <gnats-bugs@gnats.netbsd.org>
From: None <trevin@eyring.com>
List: netbsd-bugs
Date: 06/12/2000 11:19:46
>Number:         10346
>Category:       lib
>Synopsis:       `struct itimerspec' is declared in <time.h> but not defined
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 12 11:20:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Trevin Beattie
>Release:        1.4.2
>Organization:
Eyring Corporation
>Environment:
NetBSD tuktu.eyring.com 1.4.2 NetBSD 1.4.2 (TUKTU) #0: Thu Mar 23 09:25:10 MST 2000     root@tuktu.eyring.com:/usr/src/sys/arch/i386/compile/TUKTU i386 unknown

>Description:
A program which calls timer_settime() needs a struct itimerspec to fill
out and pass to the function.  But compilation fails with the error:

ntpdate.c: In function `init_alarm':
ntpdate.c:1349: storage size of `ntpdate_itimer' isn't known

(BTW: There are no man pages for the timer_XXX() function either.)
>How-To-Repeat:
Grab the xntp3-5.93e sources and try to compile ntpdate.
>Fix:
A `struct itimerspec' must contain at least the following members
(in no particular order):

	struct timespec it_value;
	struct timespec it_interval;

A proper fix cannot be suggested without knowing the exact definition
used in compiling the timer_XXX() functions in the C library.

>Release-Note:
>Audit-Trail:
>Unformatted: