NetBSD Problem Report #60227
From www@netbsd.org Mon May 4 11:33:34 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.netbsd.org", Issuer "R13" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 030A51A9239
for <gnats-bugs@gnats.NetBSD.org>; Mon, 4 May 2026 11:33:34 +0000 (UTC)
Message-Id: <20260504113332.E8DD71A923C@mollari.NetBSD.org>
Date: Mon, 4 May 2026 11:33:32 +0000 (UTC)
From: nia@pkgsrc.org
Reply-To: nia@pkgsrc.org
To: gnats-bugs@NetBSD.org
Subject: dirfd() should be visible and compliant when _POSIX_C_SOURCE is defined
X-Send-Pr-Version: www-1.0
X-From4GNATS: "nia@pkgsrc.org via gnats" <gnats-admin@NetBSD.org>
>Number: 60227
>Category: lib
>Synopsis: dirfd() should be visible and compliant when _POSIX_C_SOURCE is defined
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon May 04 11:35:01 +0000 2026
>Originator: nia
>Release: head, netbsd-11, netbsd-10, netbsd-9...
>Organization:
The NetBSD Foundation
>Environment:
>Description:
Currently dirfd() is unavailable when strict standards mode is enabled
(_POSIX_C_SOURCE). It is defined in POSIX.1-2008:
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/dirent.h.html
however, our implementation might not be quite compliant, since we
define it as a macro and I don't know whether this is kosher.
>How-To-Repeat:
>Fix:
(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.