Bug 555060
| Summary: | stdlib.h and sys/wait.h error: conflicting types for ‘__WAIT_STATUS’ | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Mark Wielaard <mjw> |
| Component: | glibc | Assignee: | Andreas Schwab <schwab> |
| Status: | CLOSED DUPLICATE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | rawhide | CC: | jakub, schwab |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2010-01-13 15:04:10 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
*** This bug has been marked as a duplicate of bug 554643 *** |
Description of problem: Including stdlib.h and sys/wait.h in the "wrong" order produces conflicting types. Version-Release number of selected component (if applicable): glibc-headers-2.11.90-7.x86_64 How reproducible: Always. Steps to Reproduce: 1. $ cat t.c #include <stdlib.h> #include <sys/wait.h> 2. gcc -c t.c Actual results: In file included from t.c:3: /usr/include/sys/wait.h:67: error: conflicting types for ‘__WAIT_STATUS’ /usr/include/stdlib.h:72: note: previous declaration of ‘__WAIT_STATUS’ was here In file included from /usr/include/sys/wait.h:81, from t.c:3: /usr/include/bits/waitstatus.h:68: error: redefinition of ‘union wait’ Expected results: t.c being compiled. Additional info: Switching the order of the includes to read: #include <sys/wait.h> #include <stdlib.h> makes things compile as workaround. But I don't believe order should matter here.