fails when compiling with -D_POSIX_SOURCE
To: None <gnats-admin>
From: None <thomas@mathematik.uni-Bremen.de>
List: netbsd-bugs
Date: 06/05/1994 13:50:03
>Number: 280
>Category: lib
>Synopsis: <sys/stat.h> fails when compiling with -D_POSIX_SOURCE
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: gnats-admin (Library Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jun 5 13:50:03 1994
>Originator: Thomas Eberhardt
>Organization:
CeVis, University of Bremen, Germany
>Release:
>Environment:
System: NetBSD ed209 0.9B NetBSD 0.9B (ED209) #0: Sun Jun 5 08:24:33 MET DST 1994 thomas@ed209:/usr/src/sys/arch/i386/compile/ED209 i386
Machine: i386
>Description:
When compiling with -D_POSIX_SOURCE <sys/stat.h> fails due to using
the type u_long which is only defined in <sys/types.h> when
_POSIX_SOURCE is not defined.
>How-To-Repeat:
Try to compile any code which uses <sys/types.h> and <sys/stat.h>
with -D_POSIX_SOURCE
>Fix:
*** src/sys/sys/stat.h- Wed May 25 14:38:42 1994
--- src/sys/sys/stat.h Fri Jun 3 02:21:33 1994
***************
*** 68,74 ****
#ifdef notyet /* XXX */
dev_t st_dev; /* inode's device */
#else
! u_long st_dev; /* inode's device */
#endif
ino_t st_ino; /* inode's number */
mode_t st_mode; /* inode protection mode */
--- 68,74 ----
#ifdef notyet /* XXX */
dev_t st_dev; /* inode's device */
#else
! unsigned long st_dev; /* inode's device */
#endif
ino_t st_ino; /* inode's number */
mode_t st_mode; /* inode protection mode */
***************
*** 78,84 ****
#ifdef notyet /* XXX */
dev_t st_rdev; /* device type */
#else
! u_long st_rdev; /* device type */
#endif
struct timespec st_atimespec; /* time of last access */
struct timespec st_mtimespec; /* time of last data modification */
--- 78,84 ----
#ifdef notyet /* XXX */
dev_t st_rdev; /* device type */
#else
! unsigned long st_rdev; /* device type */
#endif
struct timespec st_atimespec; /* time of last access */
struct timespec st_mtimespec; /* time of last data modification */
>Audit-Trail:
>Unformatted:
------------------------------------------------------------------------------