All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: Alejandro Colomar <alx@kernel.org>
Cc: linux-man@vger.kernel.org, "Mark Wielaard" <mark@klomp.org>,
	"Alexandra Hájková" <ahajkova@redhat.com>
Subject: [PATCH] close_range.2: Add _GNU_SOURCE and unistd.h to SYNOPSIS
Date: Wed,  7 Feb 2024 11:17:06 +0100	[thread overview]
Message-ID: <20240207101706.224655-1-mark@klomp.org> (raw)

close_range is defined in unistd.h when _GNU_SOURCE is defined.
The linux/close_range.h include file only defines the (linux specific)
flags constants.

Reported-by: Alexandra Hájková <ahajkova@redhat.com>
Signed-off-by: Mark Wielaard <mark@klomp.org>
---
 man2/close_range.2 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/man2/close_range.2 b/man2/close_range.2
index 380a47365..fd13ba645 100644
--- a/man2/close_range.2
+++ b/man2/close_range.2
@@ -11,7 +11,10 @@ Standard C library
 .RI ( libc ", " \-lc )
 .SH SYNOPSIS
 .nf
-.B #include <linux/close_range.h>
+.BR "#define _GNU_SOURCE" "         /* See feature_test_macros(7) */"
+.B #include <unistd.h>
+.P
+.BR "#include <linux/close_range.h>" "  /* For the flags constants */"
 .P
 .BI "int close_range(unsigned int " first ", unsigned int " last ,
 .BI "                unsigned int " flags );
-- 
2.43.0


             reply	other threads:[~2024-02-07 10:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-07 10:17 Mark Wielaard [this message]
2024-02-11 18:49 ` [PATCH] close_range.2: Add _GNU_SOURCE and unistd.h to SYNOPSIS Alejandro Colomar
2024-02-11 21:24   ` Mark Wielaard

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=20240207101706.224655-1-mark@klomp.org \
    --to=mark@klomp.org \
    --cc=ahajkova@redhat.com \
    --cc=alx@kernel.org \
    --cc=linux-man@vger.kernel.org \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.