All of lore.kernel.org
 help / color / mirror / Atom feed
From: Emanuele Torre <torreemanuele6@gmail.com>
To: Alejandro Colomar <alx@kernel.org>
Cc: linux-man@vger.kernel.org, Emanuele Torre <torreemanuele6@gmail.com>
Subject: [PATCH] grantpt.3: explicitly mention  #define _XOPEN_SOURCE  requirement
Date: Sun, 26 May 2024 08:42:18 +0200	[thread overview]
Message-ID: <20240526064227.937757-1-torreemanuele6@gmail.com> (raw)

Like the unlockpt(3) function, grantpt(3) requires _XOPEN_SOURCE to be
defined before including stdlib.h.

unlockpt.3 explicitly shows this requirement in its SYNOPSIS:

    SYNOPSIS
           #define _XOPEN_SOURCE
           #include <stdlib.h>

           int unlockpt(int fd);

But grantpt.3 did not:

    SYNOPSIS
           #include <stdlib.h>

           int grantpt(int fd);

o/
 emanuele6
---
 man/man3/grantpt.3 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/man/man3/grantpt.3 b/man/man3/grantpt.3
index 94526691b..f2d70ebd6 100644
--- a/man/man3/grantpt.3
+++ b/man/man3/grantpt.3
@@ -11,6 +11,7 @@ Standard C library
 .RI ( libc ", " \-lc )
 .SH SYNOPSIS
 .nf
+.B #define _XOPEN_SOURCE
 .B #include <stdlib.h>
 .P
 .BI "int grantpt(int " fd ");"
-- 
2.45.1


             reply	other threads:[~2024-05-26  6:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-26  6:42 Emanuele Torre [this message]
2024-05-26 10:39 ` [PATCH] grantpt.3: explicitly mention #define _XOPEN_SOURCE requirement Alejandro Colomar
2024-05-26 14:19   ` Emanuele Torre
2024-05-26 14:54     ` Alejandro Colomar
2024-05-26 15:11       ` Emanuele Torre
2024-05-26 16:38         ` Alejandro Colomar
2024-05-26 16:58           ` Emanuele Torre

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=20240526064227.937757-1-torreemanuele6@gmail.com \
    --to=torreemanuele6@gmail.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.