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 Martin Schulze <joey@debian.org>; Source for manpages-dev is src:manpages.

Reported by: Timo Juhani Lindfors <timo.lindfors@iki.fi>

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

Severity: wishlist

Tags: fixed-upstream

Found in version manpages/2.63-1

Done: Martin Schulze <joey@infodrom.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#445436; Package manpages-dev. Full text and rfc822 format available.

Acknowledgement sent to Timo Juhani Lindfors <timo.lindfors@iki.fi>:
New Bug report received and forwarded. Copy sent to Martin Schulze <joey@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Timo Juhani Lindfors <timo.lindfors@iki.fi>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: manpages-dev: fstatat: #include <sys/stat.h> does not define AT_SYMLINK_NOFOLLOW
Date: Fri, 05 Oct 2007 22:15:21 +0300
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?




Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#445436; Package manpages-dev. Full text and rfc822 format available.

Acknowledgement sent to Michael Kerrisk <mtk-manpages@gmx.net>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>. Full text and rfc822 format available.

Message #10 received at 445436@bugs.debian.org (full text, mbox):

From: Michael Kerrisk <mtk-manpages@gmx.net>
To: Timo Juhani Lindfors <timo.lindfors@iki.fi>, 445436@bugs.debian.org
Cc: debc <control@bugs.debian.org>
Subject: Re: Bug#445436: manpages-dev: fstatat: #include <sys/stat.h> does not define AT_SYMLINK_NOFOLLOW
Date: Mon, 08 Oct 2007 21:52:00 +0200
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'.





Tags added: fixed-upstream Request was from Michael Kerrisk <mtk-manpages@gmx.net> to control@bugs.debian.org. (Mon, 08 Oct 2007 20:12:06 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#445436; Package manpages-dev. (Tue, 28 Oct 2008 14:24:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Kerrisk <mtk.manpages@googlemail.com>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>. (Tue, 28 Oct 2008 14:24:02 GMT) Full text and rfc822 format available.

Message #17 received at 445436@bugs.debian.org (full text, mbox):

From: Michael Kerrisk <mtk.manpages@googlemail.com>
To: 445436@bugs.debian.org
Subject: Fixed -- please cl=ose
Date: Tue, 28 Oct 2008 09:18:17 -0500
Could this report not be closed by now?


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
git://git.kernel.org/pub/scm/docs/man-pages/man-pages.git
man-pages online: http://www.kernel.org/doc/man-pages/online_pages.html
Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html




Bug closed, send any further explanations to Timo Juhani Lindfors <timo.lindfors@iki.fi> Request was from Martin Schulze <joey@infodrom.org> to control@bugs.debian.org. (Fri, 21 Nov 2008 10:33:11 GMT) Full text and rfc822 format available.

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 20 Dec 2008 07:28:23 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 13:19:24 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.