Notice: We have migrated to GitLab launching 2024-05-01 see here:

#508 closed defect (fixed)

sys/cdefs.h conflicts again

Reported by: Ralf Corsepius Owned by: Joel Sherrill
Priority: normal Milestone: 4.11
Component: tool Version: 4.11
Severity: major Keywords:
Cc: bugs@…, ralf.corsepius@…, sebastian.huber@… Blocked By:


Both Newlib and RTEMS ship sys/cdefs.h.

Both seem to be derived from the same origin,
both to a large extend seem to be functionally equvivalent,
but are not identical.

This causes installation conflicts between RTEMS and gcc/newlib when using binary distributions (eg. rpms) and when merging RTEMS's cpukit into gcc's system headers (Installing into $prefix/<target>/include instead of $prefix/<target>/lib/include)

For testing, I changed RTEMS to using the cdefs.h from newlib.
Entering directory `/users/rtems/src/rtems-cvs/build/sparc/sparc-rtems4.7/soft/cpukit/libnetworking'
mkdir o-optimize
sparc-rtems4.7-gcc --pipe -msoft-float --pipe -DHAVE_CONFIG_H -isystem ../../../include -D_COMPILING_BSD_KERNEL_ -DKERNEL -DINET -DNFS -DDIAGNOSTIC -DBOOTP_COMPAT

-g -O2 -msoft-float -o o-optimize/kern_mib.o -c ../../../../../../rtems.master/cpukit/libnetworking/kern/kern_mib.c

In file included from ../../../../../../rtems.master/cpukit/libnetworking/kern/kern_mib.c:49:
../../../include/sys/systm.h:91: error: parse error before "dead2"
../../../include/sys/systm.h:92: error: parse error before "
../../../../../../rtems.master/cpukit/libnetworking/kern/kern_mib.c:67: error: parse error before "unused"
../../../../../../rtems.master/cpukit/libnetworking/kern/kern_mib.c:69: error: parse error before "
../../../../../../rtems.master/cpukit/libnetworking/kern/kern_mib.c:77: error: parse error before "unused"
../../../../../../rtems.master/cpukit/libnetworking/kern/kern_mib.c:103: error: parse error before "


Change History (8)

comment:1 Changed on 10/22/03 at 15:37:03 by Joel Sherrill

Status: assignedwaiting

comment:2 Changed on 03/07/06 at 21:18:20 by Joel Sherrill

Status: waitingclosed

comment:3 Changed on 03/08/06 at 15:03:56 by Joel Sherrill

Status: closedwaiting

comment:4 Changed on 08/19/08 at 19:24:30 by Joel Sherrill

Milestone: 4.9
rep_platform: All
Resolution: fixed
Status: assignedclosed

comment:5 Changed on 08/19/08 at 19:28:22 by Joel Sherrill

Resolution: fixed
Status: closedreopened

comment:6 Changed on 01/13/14 at 14:08:39 by Sebastian Huber

Milestone: 4.94.11
Resolution: fixed
Status: reopenedclosed,

comment:7 Changed on 01/13/14 at 14:13:58 by Joel Sherrill

Sebastian says fixed.

comment:8 Changed on 11/23/14 at 15:50:06 by Gedare Bloom

Version: unknown4.11

Set version based on title name, these seem obviously to only affect 4.11

Note: See TracTickets for help on using tickets.