From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: musl@lists.openwall.com
Subject: Re: fdopendir (BUG?)
Date: Mon, 28 Jan 2019 18:30:57 -0200 [thread overview]
Message-ID: <3cd586df-a7fa-8660-c17e-d32aa845431c@linaro.org> (raw)
In-Reply-To: <CAKpSnpKg22nNqiOxo3==ZwFxSvb3SnhJp4C41Uq-Y+vmZF4T_A@mail.gmail.com>
On 28/01/2019 17:42, Jorge Almeida wrote:
> On Mon, Jan 28, 2019 at 6:54 PM Adhemerval Zanella
> <adhemerval.zanella@linaro.org> wrote:
>>
>>
>>
>> On 28/01/2019 10:37, Jorge Almeida wrote:
>>> (the problem also occurs with glibc, besides the fact that glibc
>>> requires also _GNU_SOURCE to compile, contradicting the linux man
>>> page)
>> Because O_PATH is a Linux extension and it guards such definitions
>> with _GNU_SOURCE. And although man-pages is not the canonical glibc
>> documentation, it does states that O_PATH is only defined if
>> _GNU_SOURCE is also defined (man-pages commit
>> 1135dbe188a48d7fa237396ab371ebf74037c1f6 from 2013-02-13).
>
> My man page for opendir has the date 2017-09-15 ("release 4.16 of
> the Linux man-pages project") It says:
> Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
>
> fdopendir():
> Since glibc 2.10:
> _POSIX_C_SOURCE >= 200809L
> Before glibc 2.10:
> _GNU_SOURCE
>
> I have glibc-2.27
>
This is for *fdopendir* declaration, the *O_PATH* flag is documented by
open.2 and it defines:
---
CONFORMING TO
open(), creat() SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008.
openat(): POSIX.1-2008.
The O_DIRECT, O_NOATIME, O_PATH, and O_TMPFILE flags are Linux-specific.
One must define _GNU_SOURCE to obtain their definitions.
---
next prev parent reply other threads:[~2019-01-28 20:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-28 12:37 Jorge Almeida
2019-01-28 16:16 ` Rich Felker
2019-01-28 18:53 ` Adhemerval Zanella
2019-01-28 19:42 ` Jorge Almeida
2019-01-28 20:30 ` Adhemerval Zanella [this message]
2019-01-28 21:33 ` Jorge Almeida
2019-01-29 1:50 ` Adhemerval Zanella
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3cd586df-a7fa-8660-c17e-d32aa845431c@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).