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

Emanuele Torre
2024-05-26T06:42:47Z

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