Thread (7 messages) 7 messages, 2 authors, 2024-05-26

Re: [PATCH] grantpt.3: explicitly mention #define _XOPEN_SOURCE requirement

From: Alejandro Colomar <alx@kernel.org>
Date: 2024-05-26 10:39:10

Hi Emanuele,

On Sun, May 26, 2024 at 08:42:18AM GMT, Emanuele Torre wrote:
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
Patch applied; thanks.

Have a lovely day!
Alex
quoted hunk ↗ jump to hunk
---
 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
-- 
<https://www.alejandro-colomar.es/>

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help