Project

General

Profile

Actions

Bug #5423

open

poll.h incompatible with gcc -std=c99

Added by Geoff Adams almost 7 years ago. Updated about 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2014-12-10
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

It seems that sys/signal.h does not define sigset_t in standard C mode. Here is a very quick way to demonstrate the problem:

echo "#include <poll.h>" > /tmp/polltest.c
gcc -std=c99 /tmp/polltest.c

You'll see this error:

In file included from /tmp/polltest.c:1:0:
/usr/include/poll.h:51:18: error: unknown type name 'sigset_t'

poll.h does include <signal.h>, which includes <sys/signal.h>, which in turn defines sigset_t. However, the definition of sigset_t is wrapped in:

#if defined(EXTENSIONS) || defined(KERNEL) || !defined(_STRICT_STDC) || \\
defined(
_XOPEN_OR_POSIX)

I imagine that that's what's preventing this from working in c99 mode, and I'm not sure the correct way to deal with this.

Actions

Also available in: Atom PDF