[uClinux-dev] RE: strace - Massive include conflicts

Gavin Lambert gavinl at compacsort.com
Tue Aug 9 21:21:46 EDT 2005


I've had something similar.  It appears that in 2.6, <sys/types.h> and
<linux/types.h> aren't compatible (they clash with each other).

(I was compiling something else, not strace.  But it was another
userland app that was including kernel headers.)

I worked around it with a bit of an EVIL EVIL hack... better suggestions
are welcomed :)

#define _LINUX_MODULE_H
#define _SYS_TYPES_H
#define __KERNEL__
#include <linux/types.h>
// any other kernel headers you need too
#undef __KERNEL__
#include <bits/types.h>
#define __size_t_defined
#undef abs
#undef labs
// other userland headers

> -----Original Message-----
> From: Goodman, Brad
> Sent: Wednesday, 10 August 2005 13:01
> Subject: strace - Massive include conflicts
> 
> 
> from a stock uClinux-dist-20041215 kit, if I turn on STRACE, 
> I get *tons* of errors - mostly include conflicts as follows.
> 
> Anyone know why - or how to fix?
> 
> Brad Goodman
> bgoodman et empirix und com
> 
> In file included from 
> /home/bkg/uclinux/uClinux-dist/include/sys/types.h:215,
>                  from defs.h:65,
> 
> /home/bkg/uclinux/uClinux-dist/include/sys/select.h:86:1: 
> warning: this is the l ocation of the previous definition
> 
> In file included from 
> /home/bkg/uclinux/uClinux-dist/include/linux/timex.h:188,
>                  from 
> /home/bkg/uclinux/uClinux-dist/include/linux/sched.h:11,
>                  from 
> /home/bkg/uclinux/uClinux-dist/include/linux/mm.h:4,
>                  from 
> /home/bkg/uclinux/uClinux-dist/include/linux/mman.h:5,
>                  from mem.c:36:
> 
>                  from mem.c:33:
> 




More information about the uClinux-dev mailing list