struct sigaction incomplete error

前端 未结 2 1655
不知归路
不知归路 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: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 ...
    

提交回复
热议问题