PIPE(2) Example Does Not Compile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear man-page maintainers,

I believe I found a bug in the PIPE(2) example code.

When trying to compile the example code, the following error was thrown:

    pipes.c: In function ‘main’:
    pipes.c:10:5: error: unknown type name ‘pid_t’
         pid_t cpid;
         ^
After adding the line:

    #include <sys/types.h>

The example compiled fine.

I compiled with:

    gcc -Wall -std=c99

Attached is a patch that append the line to include sys/types.h.
---
manpage-version: 3.54-1
gcc-version: gcc (Debian 4.8.2-1) 4.8.2

Let me know if you need any more info, or if this is not truly a bug.

Thank you,
-- Trevor Bramwell
--- pipe2.2.old	2013-11-07 19:57:10.234837196 -0800
+++ pipe2.2	2013-11-07 19:57:10.234837196 -0800
@@ -139,6 +139,7 @@
 and echoes it on standard output.
 .nf
 
+#include <sys/types.h>
 #include <sys/wait.h>
 #include <stdio.h>
 #include <stdlib.h>

[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux