NetBSD Problem Report #280
From gnats Sun Jun 5 13:40:34 1994
Received: from forte (forte.mathematik.uni-Bremen.de [134.102.232.1]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id NAA14037 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Sun, 5 Jun 1994 13:40:19 -0700
Message-Id: <199406052039.WAA01835@forte>
Date: Sun, 5 Jun 1994 22:39:34 +0200
From: thomas@mathematik.uni-Bremen.de
Reply-To: thomas@mathematik.uni-Bremen.de
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: <sys/stat.h> fails when compiling with -D_POSIX_SOURCE
X-Send-Pr-Version: 3.2
>Number: 280
>Category: lib
>Synopsis: <sys/stat.h> fails when compiling with -D_POSIX_SOURCE
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: gnats-admin
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jun 05 13:50:03 +0000 1994
>Closed-Date: Mon Jun 13 21:24:14 +0000 1994
>Last-Modified:
>Originator: Thomas Eberhardt
>Release:
>Organization:
CeVis, University of Bremen, Germany
>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 */
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: jtc
State-Changed-When: Mon Jun 13 21:24:14 1994
State-Changed-Why:
Fixed.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.