Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22171

POSIX sigevent not compiling with c11

$
0
0

I have simple app in C that is using POSIX struct sigevent.

#include <signal.h>

int main(int argc, char *argv[])
{
    struct sigevent sig_event;

    return 0;
}

When I compile it like this:

gcc test.c

it is fine. When I force C11 mode, it fails:

gcc test.c --std=c11

test.c: In function ‘main’:
test.c:5:21: error: storage size of ‘sig_event’ isn’t known
    struct sigevent sig_event;

I'm using gcc 5.2.1 on Ubuntu 15.10. Any ideas what is causing those errors? This problem first occured when I tried to compile example from manual for timer_create() function. Situation was the same, except for much more errors.


Viewing all articles
Browse latest Browse all 22171

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>