struct sigaction incomplete error

前端 未结 2 1653
不知归路
不知归路 2020-12-10 12:08

Although including I get an error saying that struct sigaction is an incomplete type.

I have no Idea what to do with it.

相关标签:
2条回答
  • 2020-12-10 12:21

    I resolved this by changing the C standard that I was using with gcc.

    I changed: gcc -std=c99 ...

    to this: gcc -std=gnu99 ...

    0 讨论(0)
  • 2020-12-10 12:34

    Just

    #define _XOPEN_SOURCE 700
    

    before any other line in your code, or compile with the -D option to define the preprocessor symbol

    gcc ... -D_XOPEN_SOURCE=700 ...
    
    0 讨论(0)
提交回复
热议问题