Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/compel
diff options
context:
space:
mode:
authorRadostin Stoyanov <rstoyanov@fedoraproject.org>2021-01-12 02:38:43 +0300
committerAndrei Vagin <avagin@gmail.com>2021-09-03 20:31:00 +0300
commit8aba7ae9fa5f3d563500d2f76ecde16b02981b17 (patch)
tree34c45f31fe74caaf9d9d44ca41cbb7ce2785d309 /compel
parentcffbeffed602d971abd66b2017d85c45ba90aeec (diff)
compel: Fix missing loff_t in Alpine
musl defines 'loff_t' in fcntl.h as 'off_t'. This patch resolves the following error when running the compel tests on Alpine Linux: gcc -O2 -g -Wall -Werror -c -Wstrict-prototypes -fno-stack-protector -nostdlib -fomit-frame-pointer -ffreestanding -fpie -I ../../../compel/include/uapi -o parasite.o parasite.c In file included from ../../../compel/include/uapi/compel/plugins/std/syscall.h:8, from ../../../compel/include/uapi/compel/plugins/std.h:5, from parasite.c:3: ../../../compel/include/uapi/compel/plugins/std/syscall-64.h:19:66: error: unknown type name 'loff_t'; did you mean 'off_t'? 19 | extern long sys_pread (unsigned int fd, char *buf, size_t count, loff_t pos) ; | ^~~~~~ | off_t ../../../compel/include/uapi/compel/plugins/std/syscall-64.h:96:46: error: unknown type name 'loff_t'; did you mean 'off_t'? 96 | extern long sys_fallocate (int fd, int mode, loff_t offset, loff_t len) ; | ^~~~~~ | off_t ../../../compel/include/uapi/compel/plugins/std/syscall-64.h:96:61: error: unknown type name 'loff_t'; did you mean 'off_t'? 96 | extern long sys_fallocate (int fd, int mode, loff_t offset, loff_t len) ; | ^~~~~~ | off_t make[1]: *** [Makefile:32: parasite.o] Error 1 Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
Diffstat (limited to 'compel')
-rw-r--r--compel/arch/x86/plugins/std/syscalls/Makefile.syscalls8
1 files changed, 8 insertions, 0 deletions
diff --git a/compel/arch/x86/plugins/std/syscalls/Makefile.syscalls b/compel/arch/x86/plugins/std/syscalls/Makefile.syscalls
index 4ba4b56c8..62c25f3e0 100644
--- a/compel/arch/x86/plugins/std/syscalls/Makefile.syscalls
+++ b/compel/arch/x86/plugins/std/syscalls/Makefile.syscalls
@@ -39,6 +39,10 @@ $(sys-proto): $(sys-def) $(sys-proto-types)
$(Q) echo "/* Autogenerated, don't edit */" > $$@
$(Q) echo "#ifndef ASM_SYSCALL_PROTO_H_$(1)__" >> $$@
$(Q) echo "#define ASM_SYSCALL_PROTO_H_$(1)__" >> $$@
+ $(Q) echo "/* musl defines loff_t as off_t */" >> $$@
+ $(Q) echo '#ifndef loff_t' >> $$@
+ $(Q) echo '#define loff_t off_t' >> $$@
+ $(Q) echo '#endif' >> $$@
$(Q) echo '#include <compel/plugins/std/syscall-codes-$(1).h>' >> $$@
$(Q) echo '#include <compel/plugins/std/syscall-types.h>' >> $$@
ifeq ($(1),32)
@@ -71,6 +75,10 @@ $(sys-codes-generic): $(PLUGIN_ARCH_DIR)/std/syscalls/syscall_32.tbl $(sys-proto
$(Q) echo "/* Autogenerated, don't edit */" > $@
$(Q) echo "#ifndef __ASM_CR_SYSCALL_CODES_H__" >> $@
$(Q) echo "#define __ASM_CR_SYSCALL_CODES_H__" >> $@
+ $(Q) echo "/* musl defines loff_t as off_t */" >> $@
+ $(Q) echo '#ifndef loff_t' >> $@
+ $(Q) echo '#define loff_t off_t' >> $@
+ $(Q) echo '#endif' >> $@
$(Q) echo '#include <compel/plugins/std/syscall-codes-64.h>' >> $@
$(Q) cat $< | awk '/^__NR/{NR32=$$1; \
sub("^__NR", "__NR32", NR32); \