Building ckptinfo on s390x fails: $ make -k cc -g -Wall -Wstrict-prototypes -Wno-trigraphs -I./include -DCHECKPOINT_DEBUG -c -o ckptinfo_types.o ckptinfo_types.c In file included from ./include/linux/checkpoint_hdr.h:19, from ckptinfo_types.c:7: /usr/include/sys/types.h:46: error: conflicting types for 'loff_t' /usr/include/linux/types.h:30: error: previous declaration of 'loff_t' was here /usr/include/sys/types.h:50: error: conflicting types for 'ino_t' /usr/include/linux/types.h:14: error: previous declaration of 'ino_t' was here /usr/include/sys/types.h:62: error: conflicting types for 'dev_t' /usr/include/linux/types.h:13: error: previous declaration of 'dev_t' was here /usr/include/sys/types.h:77: error: conflicting types for 'nlink_t' /usr/include/linux/types.h:16: error: previous declaration of 'nlink_t' was here In file included from /usr/include/sys/types.h:133, from ./include/linux/checkpoint_hdr.h:19, from ckptinfo_types.c:7: /usr/include/time.h:105: error: conflicting types for 'timer_t' /usr/include/linux/types.h:22: error: previous declaration of 'timer_t' was here In file included from /usr/include/sys/types.h:220, from ./include/linux/checkpoint_hdr.h:19, from ckptinfo_types.c:7: /usr/include/sys/select.h:78: error: conflicting types for 'fd_set' /usr/include/linux/types.h:12: error: previous declaration of 'fd_set' was here In file included from ./include/linux/checkpoint_hdr.h:19, from ckptinfo_types.c:7: /usr/include/sys/types.h:235: error: conflicting types for 'blkcnt_t' /usr/include/linux/types.h:124: error: previous declaration of 'blkcnt_t' was here make: *** [ckptinfo_types.o] Error 1 One way to fix this seems to be to include a file that will indirectly choose definitions for loff_t and the like -- unistd.h. The alternative seems to be to add this include to checkpoint_hdr.h. That has a couple problems Adding userspace-specific bits in the kernel source OR modifying scripts/extract-headers.sh. What happens if we want to switch the definitions of the posix (_t) types? checkpoint_hdr.h has already chosen for us. This solution leaves it up to the code outside the checkpoint headers as to what basic definitions to use. Signed-off-by: Matt Helsley <matthltc@xxxxxxxxxx> Cc: Serge E. Hallyn <serue@xxxxxxxxxx> --- ckptinfo.py | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/ckptinfo.py b/ckptinfo.py index 1c98569..bea1b5d 100755 --- a/ckptinfo.py +++ b/ckptinfo.py @@ -78,6 +78,7 @@ print """ * This file is auto-generated by ckptinfo.py */ +#include <unistd.h> #include <linux/checkpoint_hdr.h> """ -- 1.6.3.3 _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/containers