Red Hat Bugzilla – Bug 72175
#include <fcntl.h> // doesn't get me F_SETSIG anymore
Last modified: 2007-04-18 12:45:46 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.79 [en] (Windows NT 5.0; U)
Description of problem:
I wrote a sample program to raise a single when data was ready on a file descriptor. The signal must be set to get information to the signal
handler. The F_SETSIG symbol/macro/define wasn't in the include file. I did a recursive grep in the include directory, and found its value should
be 10, so I used that, and the program works. The man page for fcntl only has me including fcntl.h but this didn't get F_SETSIG defined for me.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.Write a program that includes fcntl.h, and used the F_SETSIG symbol.
3. program won't compile due to an undefined symbol
Actual Results: The program won't compile.
Expected Results: I think the fcntl.h should include enough other files, so that this gets defined.
It is defined in a subdiretories file. The other fcntl command arguements are defined, or atleast the other I have used.
I am pretty sure I didn't misspell the symbol name though. I found it with a recursive grep, and just use the numerical value,
but that isn't very portable.
F_SETSIG is a GNU extension, so you need to -D_GNU_SOURCE when compiling
file using it to get its definition. See info libc on feature set macros.