Compile error: 'siginfo_t' is not declared using gcc-4.8.2 on RedHat, 6.4

John Dubchak lists@johndubchak.com
Mon Jan 27 22:39:00 GMT 2014


On 1/27/14 2:20 PM, Marc Glisse wrote:
> On Mon, 27 Jan 2014, John Dubchak wrote:
>
>> However, after installing it with 'make' and 'make install' and
>> compiling with C++11 support using:
>>
>> /usr/local/gcc-4.8.2/bin/g++-48 -v -std=c++11 -c -I . -I
>> ./workspace/http/http-server/src -I ./jsoncpp-src-0.5.0/include -Wall
>> main.cpp -o main.o
>>
>> I get this error:
>>
>> In file included from main.cpp:14:
>> /usr/include/sys/wait.h:155:52: error: 'siginfo_t' has not been declared
>>  extern int waitid (idtype_t __idtype, __id_t __id, siginfo_t *__infop,
>>                                                     ^
>>
>> Here is the code that generates the error:
>>
>> #include <sys/wait.h>
>
> man waitpid
>
> SYNOPSIS
>         #include <sys/types.h>
>         #include <sys/wait.h>
>
> Did you try that?
>

Thanks for your reply, Marc.  Yes, I have tried that as well.  Here are 
the headers I am including:

#include <cerrno>
#include <sys/types.h>
#include <sys/wait.h>

The error persists:

In file included from http_server_signals.hpp:12:0,
                  from http_server.hpp:21,
                  from http_service_traits.hpp:15,
                  from main.cpp:14:
/usr/include/sys/wait.h:155:52: error: ‘siginfo_t’ has not been declared
  extern int waitid (idtype_t __idtype, __id_t __id, siginfo_t *__infop,

Thanks,
John




More information about the Gcc-help mailing list