[ECOS] abs() defined in two places

Gary Thomas gthomas@redhat.com
Mon Apr 3 09:46:00 GMT 2000

I've seen this before.  While I don't have a perfect solution, simply
add the line:
  #define LIBKERN_INLINE  // Avoid kernel inline functions
before you include <network.h>.

Note: I may end up adding this to <network.h>. 

On 03-Apr-00 Grant Edwards wrote:
> It looks like my installation of the 1.3.1 headers are defining abs()
> in two places: stdlib.h and libkern.h.
> ------------------------------testit.c------------------------------
>#include <stdlib.h>
>#include <network.h>
> int j;
> --------------------------------------------------------------------
> $make
> arm-elf-gcc -g -mcpu=arm7tdmi -mbig-endian -c -o testit.o -fverbose-asm -Wa,-ahlsn=testit.lst -O0
> -D__ECOS -I../ecos/include -Wall  testit.c
> In file included from ../ecos/include/machine/param.h:91,
>                  from ../ecos/include/sys/param.h:166,
>                  from ../ecos/include/network.h:60,
>                  from testit.c:2:
> ../ecos/include/lib/libkern/libkern.h:113: warning: static declaration for abs' follows
> non-static
> arm-elf-gcc -g -mcpu=arm7tdmi -mbig-endian -Wl,-Map,testit.map -nostartfiles -L../ecos/lib -o
> testit  testit.o -Ttarget.ld -nostdlib
> I thought maybe I had my CFLAGS set wrong, but from looking at the include
> files, I can't see anything obvious.  (The program works fine, I'm just trying
> to get rid of all of the compiler warnings.)
> -- 
> Grant Edwards
> grante@visi.com

More information about the Ecos-discuss mailing list