pipe2 implicit declaration despite include unistd.h
Dear Ubuntu Community,
We have a fairly fresh install of Ubuntu 18.04 Desktop. On this system, I'm trying to compile a C language program which makes a call to the Linux-specific pipe2( ) system call.
Critically, the top of the source file says:
#include <fcntl.h>
#include <unistd.h>
But gcc gives me the following warning:
$ gcc *.c -o metserver -lrt
metpipe.c: In function ‘metpipe’:
metpipe.
function ‘pipe2’; did you mean ‘pipe’?
[-Wimplicit
if ( pipe2 ( fd , flags ) == -1 )
^~~~~
pipe
Specifically, metserver makes a call to metpipe which then calls pipe2( ). But both source files include my met.h header file at the top. met.h includes the unistd.h and fcntl.h headers. This all compiled and ran smoothly on a previous installation of Ubuntu 14.04 on the same system.
The only thing similar to this that Google could find was here: https:/
I look forward to any suggestions that might resolve this issue.
Cheers,
js
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu glibc Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Jackson Smith
- Solved:
- Last query:
- Last reply: