linux-user: fix __NR_semtimedop undeclared error
commit86e636951ddce2bb3a82fcaad5abc3779ba4f7ab
authorLaurent Vivier <laurent@vivier.eu>
Thu, 23 May 2019 17:54:13 +0000 (23 19:54 +0200)
committerAleksandar Markovic <amarkovic@wavecomp.com>
Sun, 26 May 2019 15:44:33 +0000 (26 17:44 +0200)
tree7486f6f04fea31a53729c0b411742354ee75013c
parent7353113fa482e697a77575086a41f429a01f8dc0
linux-user: fix __NR_semtimedop undeclared error

In current code, __NR_msgrcv and__NR_semtimedop are supposed to be
defined if __NR_msgsnd is defined.

But linux headers 5.2-rc1 for MIPS define __NR_msgsnd without defining
__NR_semtimedop and it breaks the QEMU build.

__NR_semtimedop is defined in asm-mips/unistd_n64.h and asm-mips/unistd_n32.h
but not in asm-mips/unistd_o32.h.

Commit d9cb4336159a ("linux headers: update against Linux 5.2-rc1") has
updated asm-mips/unistd_o32.h and added __NR_msgsnd but not __NR_semtimedop.
It introduces __NR_semtimedop_time64 instead.

This patch fixes the problem by checking for each __NR_XXX symbol
before defining the corresponding syscall.

Fixes: d9cb4336159a ("linux headers: update against Linux 5.2-rc1")
Reported-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20190523175413.14448-1-laurent@vivier.eu>
linux-user/syscall.c