[etherlab-users] Compile errors

Jesper Smith jsmith at ihmc.us
Wed Sep 29 22:29:41 CEST 2010

When trying to compile the latest Etherlab master from the mercurial 
repository on the following system

- Opensuse 11.3
- Kernel + RT_PREEMPT rt29

I got the following compile error

  CC [M]  /home/jesper/compilation/ethercat-devel/examples/mini/mini.o
/home/jesper/compilation/ethercat-devel/examples/mini/mini.c: In function 
/home/jesper/compilation/ethercat-devel/examples/mini/mini.c:466:9: error: 
implicit declaration of function ‘kmalloc’
/home/jesper/compilation/ethercat-devel/examples/mini/mini.c:466:28: warning: 
cast to pointer from integer of different size
/home/jesper/compilation/ethercat-devel/examples/mini/mini.c:501:5: error: 
implicit declaration of function ‘kfree’
make[6]: *** [/home/jesper/compilation/ethercat-devel/examples/mini/mini.o] 
Error 1

To fix this errors I had to add the following 

#include <linux/slab.h>

to these files


If it won't break building on other system I think this should be included in 
the main source tree.

Best Regards,

Jesper Smith

More information about the Etherlab-users mailing list