From: Garrett C. <yan...@gm...> - 2011-01-14 21:39:43
|
On Fri, Jan 14, 2011 at 1:24 PM, Mike Frysinger <va...@ge...> wrote: > On Friday, January 14, 2011 04:48:33 Peng Haitao wrote: >> testcases/kernel/syscalls/mallopt/mallopt01.c | 1 + > > please use descriptive subjects in your patches. this really should be > something like: > mallopt01: fix build error due to xxxx > >> --- a/testcases/kernel/syscalls/mallopt/mallopt01.c >> +++ b/testcases/kernel/syscalls/mallopt/mallopt01.c >> @@ -37,6 +37,7 @@ >> #ifdef CONFIG_COLDFIRE >> #define __MALLOC_STANDARD__ >> #endif >> +#include <malloc.h> > > umm, no. malloc.h is a dead header file and nothing should be including it. It is exposing extra junk in this case that isn't available from stdlib.h, which unfortunately the test uses. I fixed the build error for now, but maybe someone upstream should be informed that this header needs to die a painful death, because all contemporary documentation says that you need to include stdlib.h, not malloc.h when working with malloc(3). I was reminded of this recently because I built some stuff on FreeBSD and FreeBSD has a nice #warning about this deprecation. Thanks, -Garrett |