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);
Message-ID: <
20240526064227.937757-1-torreemanuele6@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
.RI ( libc ", " \-lc )
.SH SYNOPSIS
.nf
+.B #define _XOPEN_SOURCE
.B #include <stdlib.h>
.P
.BI "int grantpt(int " fd ");"