Subject: lib/46: utmp.h requires sys/types.h to precede it
To: None <gnats-admin>
From: None <>
List: netbsd-bugs
Date: 12/16/1993 14:35:03
>Number:         46
>Category:       lib
>Synopsis:       utmp.h requires sys/types.h to precede it
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin (Library Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 16 14:35:02 1993
>Originator:     David Deaven
Ames Laboratory USDOE
David Deaven
A504 Physics        tel 515-294-6878
Ames Laboratory     fax 515-294-0689
Ames IA 50011
>Release:        0.9
System: NetBSD 0.9 BLACKRAT#0 i386

Compilation of a program which includes utmp.h before sys/types.h
fails since utmp.h requires a defined time_t without checking to make
sure it's there.
Any compilation with the above #include order.
*** /usr/include/utmp.h.orig    Thu Dec 16 16:29:51 1993
--- /usr/include/utmp.h Thu Dec 16 16:31:08 1993
*** 36,41 ****
--- 36,45 ----
  #ifndef       _UTMP_H_
  #define       _UTMP_H_
+ #ifndef _SYS_TYPES_H_
+ #include <sys/types.h>
+ #endif
  #define       _PATH_UTMP      "/var/run/utmp"
  #define       _PATH_WTMP      "/var/log/wtmp"
  #define       _PATH_LASTLOG   "/var/log/lastlog"