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

Alejandro Colomar
2024-05-26T10:39:10Z

[-- Attachment #1: Type: text/plain, Size: 1072 bytes --]

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

> ---
> 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/>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]