Bug 107992 - System include files have conflicting definitions of sigset_t
Summary: System include files have conflicting definitions of sigset_t
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc
Version: 9
Hardware: i386
OS: Linux
high
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-10-25 19:58 UTC by nick caruso
Modified: 2016-11-24 15:09 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-10-06 05:25:49 UTC
Embargoed:


Attachments (Terms of Use)

Description nick caruso 2003-10-25 19:58:23 UTC
Description of problem:

System include files have conflicting definitions for sigset_t, preventing
legitimate code from compiling.

Version-Release number of selected component (if applicable):


How reproducible:

100%

Steps to Reproduce:
1. Create the following file, named repro.cpp:

#include <sys/types.h>
#include <sys/io.h>
#include <stdio.h>
#include <pthread.h>
int main( int argc, char *argv[] )
{
  printf("foo.\n");
}

2. run the following command

g++ -O2 -Wall -I/usr/src/linux-2.4/include/asm-i386 -I../include -I/usr/include
    -c -o repro.o repro.cpp

    
Actual results:

In file included from /usr/include/pthread.h:24,
                 from repro.cpp:4:
/usr/src/linux-2.4/include/asm-i386/signal.h:27: conflicting types for `typedef 
   long unsigned int sigset_t'
/usr/include/sys/select.h:38: previous declaration as `typedef struct 
   __sigset_t sigset_t'

Expected results:

No errors.

Additional info:

Comment 1 Richard Henderson 2004-10-04 05:55:27 UTC
Not a gcc bug.

Comment 2 Ulrich Drepper 2004-10-06 05:25:49 UTC
This is all your fault.  You add -I/usr/src/linux-2.4/include/asm-i386
and expect things to work.  The files in this directory are no
replacement for the libc files.  Never use such an -I parameter.


Note You need to log in before you can comment on or make changes to this bug.