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

Oren Laadan orenl at librato.com
Wed Sep 16 08:36:16 PDT 2009



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 ?

Oren.


More information about the Containers mailing list