Debian Bug report logs - #445436
manpages-dev: fstatat: #include <sys/stat.h> does not define AT_SYMLINK_NOFOLLOW

version graph

Package: manpages-dev; Maintainer for manpages-dev is Dr. Tobias Quathamer <[email protected]>; Source for manpages-dev is src:manpages (PTS, buildd, popcon).

Reported by: Timo Juhani Lindfors <[email protected]>

Date: Fri, 5 Oct 2007 19:18:01 UTC

Severity: wishlist

Tags: fixed-upstream

Found in version manpages/2.63-1

Done: Martin Schulze <[email protected]>

Bug is archived. No further changes may be made.

Full log


🔗 View this message in rfc822 format

X-Loop: [email protected]
Subject: Bug#445436: manpages-dev: fstatat: #include <sys/stat.h> does not define AT_SYMLINK_NOFOLLOW
Reply-To: Michael Kerrisk <[email protected]>, [email protected]
Resent-From: Michael Kerrisk <[email protected]>
Resent-To: [email protected]
Resent-CC: Martin Schulze <[email protected]>
Resent-Date: Mon, 08 Oct 2007 20:12:04 +0000
Resent-Message-ID: <[email protected]>
Resent-Sender: [email protected]
X-Debian-PR-Message: report 445436
X-Debian-PR-Package: manpages-dev
X-Debian-PR-Keywords: 
X-Debian-PR-Source: manpages
Received: via spool by [email protected] id=B445436.11918733206464
          (code B ref 445436); Mon, 08 Oct 2007 20:12:04 +0000
Received: (at 445436) by bugs.debian.org; 8 Oct 2007 19:55:20 +0000
X-Spam-Checker-Version: SpamAssassin 3.1.4-bugs.debian.org_2005_01_02 
	(2006-07-26) on rietz.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-8.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER,
	VALID_BTS_CONTROL autolearn=no 
	version=3.1.4-bugs.debian.org_2005_01_02
Received: from mail.gmx.net ([213.165.64.20])
	by rietz.debian.org with smtp (Exim 4.50)
	id 1IeyhE-0001QP-0l
	for [email protected]; Mon, 08 Oct 2007 19:55:20 +0000
Received: (qmail invoked by alias); 08 Oct 2007 19:54:48 -0000
Received: from 221-84.0-85.cust.bluewin.ch (EHLO [192.168.1.35]) [85.0.84.221]
  by mail.gmx.net (mp054) with SMTP; 08 Oct 2007 21:54:48 +0200
X-Authenticated: #24879014
X-Provags-ID: V01U2FsdGVkX196hpdgh1R6ghL24sAx/xeINqca8Pp3HoiAJdziqC
	LdFhvYqMygoCem
Message-ID: <[email protected]>
Date: Mon, 08 Oct 2007 21:52:00 +0200
From: Michael Kerrisk <[email protected]>
User-Agent: Thunderbird 1.5.0.8 (X11/20060911)
MIME-Version: 1.0
To: Timo Juhani Lindfors <[email protected]>,  [email protected]
CC: debc <[email protected]>
References: <20071005191521.2236.10600.reportbug@sauna>
In-Reply-To: <20071005191521.2236.10600.reportbug@sauna>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
tags 445436 fixed-upstream
thanks

Hi Timo,

Timo Juhani Lindfors wrote:
> Package: manpages-dev
> Version: 2.63-1
> Severity: wishlist
> 
> Steps to reproduce:
> 1) cat >testcase.c <<EOF
> #define _ATFILE_SOURCE
> #include <sys/stat.h>
> #include <stdio.h>
> 
> int main(int argc, char *argv[]) {
>     printf("%d\n", AT_SYMLINK_NOFOLLOW);
>     return 0;
> }
> EOF
> 2) gcc -c testcase.c
> 
> Expected results:
> 2) gcc compiles code into testcase.o
> 
> Actual results:
> 2) compilation fails with the error messages
> 
> a.c: In function 'main':
> a.c:6: error: 'AT_SYMLINK_NOFOLLOW' undeclared (first use in this function)
> a.c:6: error: (Each undeclared identifier is reported only once
> a.c:6: error: for each function it appears in.)
> 
> even though ma fstatat mentions that
> 
> #define _ATFILE_SOURCE
> #include <sys/stat.h>
> 
> should be enough to get AT_SYMLINK_NOFOLLOW defined.
> 
> More info:
> 1) It seems that
> 
> #include <fcntl.h>
> 
> defines AT_SYMLINK_NOFOLLOW -- maybe this should be documented?

You are of course quite right, and the fault applies to many other related
pages as well.  This the fix for upstream 2.68:

faccessat.2
fchmodat.2
fchownat.2
fstatat.2
futimesat.2
linkat.2
mkdirat.2
mknodat.2
readlinkat.2
renameat.2
symlinkat.2
mkfifoat.3
    mtk, after Debian bug 445436 by Timo Juhani Lindfors
        Added <fcntl.h> to SYNOPSIS.

Thanks for your report.

Michael

-- 
Michael Kerrisk
maintainer of Linux man pages Sections 2, 3, 4, 5, and 7

Want to help with man page maintenance?  Grab the latest tarball at
http://www.kernel.org/pub/linux/docs/manpages/
read the HOWTOHELP file and grep the source files for 'FIXME'.





Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Wed Nov 13 13:10:44 2024; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.