#include <linux/mm.h>
main () {
int a;
memset(&a, sizeof(a), 0);
}
---
bash# gcc -o t t.c
/tmp/cca019061.o: In function `main':
t.c:0: undefined reference to `__constant_c_memset'
t.c:0: undefined reference to `__memset'
Does turning on '-O2' make the problem go away? Gcc looks like it
isn't inlining the functions the linker is complaining about, and the
gcc docs explicitly state that inlining isn't guarenteed to occur with
optimizations off.
Later,
David S. Miller
davem@caip.rutgers.edu