F_SETPIPE_SZ undeclared

后端 未结 2 1804
余生分开走
余生分开走 2020-12-11 05:34

I have included following headers:

#include 
#include 
#include 
#include 

#include 

        
相关标签:
2条回答
  • 2020-12-11 06:22

    F_SETPIPE_SZ/F_GETPIPE_SZ are relatively recent. Older kernels (e.g. 2.6.32 as used in RHEL6) don't have them. If you look in /usr/include/linux/fcntl.h and these constants aren't defined, then this API isn't going to work and you'll have to find some way to bypass it in whatever you're building.

    0 讨论(0)
  • 2020-12-11 06:24

    So here's the solution, thanks to Chrono Kitsune:

    Put

    #define _GNU_SOURCE
    

    before any includes.

    You should also pay attention to Chrono Kitsune's other comment.

    0 讨论(0)
提交回复
热议问题