F_SETPIPE_SZ uneclared
I have included the following headers:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
I also tried to use
#define _GNU_SOURCE
before #include <unistd.h>
, but that doesn't help either.
I'm trying to use fcntl
and pass it F_SETPIPE_SZ
as the second argument, but I keep getting this error message:
error: 'F_SETPIPE_SZ uneclared (use in this function first)
I actually found out that I don't need this, but I'm just wondering why I can't use it.
Thank.
So here's the solution, thanks to Chrono Kitsune: Placed
#define _GNU_SOURCE
before turning on.
+3
source to share
2 answers
So here, thanks to Chrono Kitsune :
Placed
#define _GNU_SOURCE
before turning on.
You should also pay attention to Chrono Kitsune's other comment .
+5
source to share