Does anyone know how I can enable the declaration of ptsname() in stdlib.h? Or do I have another issue?
I am on Ubuntu 18.04.
Code:
$ cat zz.c
#define _XOPEN_SOURCE
#include <stdlib.h>
int foo() {
char *n = ptsname(0);
}
$ gcc -c zz.c
zz.c: In function 'foo':
zz.c:5:13: warning: implicit declaration of function 'ptsname' [-Wimplicit-function-declaration]
char *n = ptsname(0);
^~~~~~~
zz.c:5:13: warning: initialization makes pointer from integer without a cast [-Wint-conversion]