[Devel] Re: [PATCH 3/9] futex.h: fix compat builds

Nathan Lynch ntl at pobox.com
Wed Sep 16 10:46:10 PDT 2009


On Wed, 2009-09-16 at 11:36 -0400, Oren Laadan wrote:
> 
> Nathan Lynch wrote:
> > With any build where CONFIG_COMPAT=y:
> > 
> > checkpoint/process.c: In function 'save_task_robust_futex_list':
> > checkpoint/process.c:37: error: implicit declaration of function 'ptr_to_compat'
> > checkpoint/process.c:38: error: dereferencing pointer to incomplete type
> > checkpoint/process.c: In function 'restore_task_robust_futex_list':
> > checkpoint/process.c:54: error: implicit declaration of function 'compat_ptr'
> > checkpoint/process.c:54: warning: assignment makes pointer from integer without a cast
> > checkpoint/process.c:55: error: implicit declaration of function 'do_compat_set_robust_list'
> > 
> > ptr_to_compat et al need compat.h; however, futex.h is exported while
> > compat.h is not.  So the include is guarded by #ifdef __KERNEL__.
> > 
> > Signed-off-by: Nathan Lynch <ntl at pobox.com>
> 
> Including futex.h does not require compat.h. Rather, it's the code
> in checkpoint/process.c that uses ptr_to_compat() et al. Is there a
> reason not to include compat.h from checkpoint/process.c instead ?

Oh my, you're right.  I had this hanging around from an older tree where
futex.h did need it, but it's obviously not the right fix now.  The
include should go in checkpoint/process.c.



_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list