qemu-irix/linux-user
Daniel P. Berrangé 939acda8af linux-user: rename gettid() to sys_gettid() to avoid clash with glibc
The glibc-2.29.9000-6.fc31.x86_64 package finally includes the gettid()
function as part of unistd.h when __USE_GNU is defined. This clashes
with linux-user code which unconditionally defines this function name
itself.

/home/berrange/src/virt/qemu/linux-user/syscall.c:253:16: error: static declaration of ‘gettid’ follows non-static declaration
  253 | _syscall0(int, gettid)
      |                ^~~~~~
/home/berrange/src/virt/qemu/linux-user/syscall.c:184:13: note: in definition of macro ‘_syscall0’
  184 | static type name (void)   \
      |             ^~~~
In file included from /usr/include/unistd.h:1170,
                 from /home/berrange/src/virt/qemu/include/qemu/osdep.h:107,
                 from /home/berrange/src/virt/qemu/linux-user/syscall.c:20:
/usr/include/bits/unistd_ext.h:34:16: note: previous declaration of ‘gettid’ was here
   34 | extern __pid_t gettid (void) __THROW;
      |                ^~~~~~
  CC      aarch64-linux-user/linux-user/signal.o
make[1]: *** [/home/berrange/src/virt/qemu/rules.mak:69: linux-user/syscall.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:449: subdir-aarch64-linux-user] Error 2

While we could make our definition conditional and rely on glibc's impl,
this patch simply renames our definition to sys_gettid() which is a
common pattern in this file.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20190320161842.13908-3-berrange@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2019-10-08 01:49:23 +00:00
..
aarch64 linux-user: Move CPU type name selection to a function 2018-02-25 17:27:41 +01:00
alpha linux-user: Move CPU type name selection to a function 2018-02-25 17:27:41 +01:00
arm linux-user: Move CPU type name selection to a function 2018-02-25 17:27:41 +01:00
cris linux-user: Move CPU type name selection to a function 2018-02-25 17:27:41 +01:00
host linux-user: Fix register used for 6th and 7th syscall argument on aarch64 2018-02-18 18:52:32 +01:00
hppa linux-user: Move CPU type name selection to a function 2018-02-25 17:27:41 +01:00
i386 linux-user: Move CPU type name selection to a function 2018-02-25 17:27:41 +01:00
irix kludge for irix 6.5.16+ 2019-07-23 05:52:21 +00:00
m68k linux-user, m68k: select CPU according to ELF header values 2018-02-25 17:29:21 +01:00
microblaze linux-user: Move CPU type name selection to a function 2018-02-25 17:27:41 +01:00
mips linux-user: MIPS set cpu to r6 CPU if binary is R6 2018-02-25 17:29:45 +01:00
mips64 linux-user: MIPS set cpu to r6 CPU if binary is R6 2018-02-25 17:29:45 +01:00
nios2 linux-user: Move CPU type name selection to a function 2018-02-25 17:27:41 +01:00
openrisc linux-user: Move CPU type name selection to a function 2018-02-25 17:27:41 +01:00
ppc linux-user: Move CPU type name selection to a function 2018-02-25 17:27:41 +01:00
riscv RISC-V Linux User Emulation 2018-03-07 08:30:28 +13:00
s390x linux-user: Move CPU type name selection to a function 2018-02-25 17:27:41 +01:00
sh4 linux-user: Move CPU type name selection to a function 2018-02-25 17:27:41 +01:00
solaris irix and solaris userland emulation (linux-user targets irix,irixn32,irix64,solaris) 2018-03-10 17:05:57 +01:00
sparc irix and solaris userland emulation (linux-user targets irix,irixn32,irix64,solaris) 2018-03-10 17:05:57 +01:00
sparc64 irix and solaris userland emulation (linux-user targets irix,irixn32,irix64,solaris) 2018-03-10 17:05:57 +01:00
tilegx linux-user: Move CPU type name selection to a function 2018-02-25 17:27:41 +01:00
unicore32 linux-user: Move CPU type name selection to a function 2018-02-25 17:27:41 +01:00
x86_64 linux-user: Move CPU type name selection to a function 2018-02-25 17:27:41 +01:00
Makefile.objs linux-user: Provide safe_syscall for fixing races between signals and syscalls 2016-05-27 14:49:51 +03:00
elfload.c fixes for building on 32 bit host systems 2019-07-23 05:52:29 +00:00
errno_defs.h irix and solaris userland emulation (linux-user targets irix,irixn32,irix64,solaris) 2018-03-10 17:05:57 +01:00
flat.h
flatload.c linux-user: Fix error handling in flatload.c target_pread() 2016-09-21 14:27:19 +03:00
ioctls.h fixed build failure 2019-07-23 05:52:50 +00:00
linux_loop.h linux-user: Add loop control ioctls 2016-07-19 15:22:33 +03:00
linuxload.c
m68k-sim.c
main.c add -silent option to silence logging 2018-04-20 19:40:31 -05:00
mmap.c linux-user/mmap.c: Avoid choosing NULL as start address 2018-01-23 14:20:52 +01:00
qemu.h automatically spawn child processes inside QEMU instance 2018-04-20 19:22:28 -05:00
safe-syscall.S linux-user: Provide safe_syscall for fixing races between signals and syscalls 2016-05-27 14:49:51 +03:00
signal.c irix and solaris userland emulation (linux-user targets irix,irixn32,irix64,solaris) 2018-03-10 17:05:57 +01:00
socket.h irix and solaris userland emulation (linux-user targets irix,irixn32,irix64,solaris) 2018-03-10 17:05:57 +01:00
strace.c irix and solaris userland emulation (linux-user targets irix,irixn32,irix64,solaris) 2018-03-10 17:05:57 +01:00
strace.list irix and solaris userland emulation (linux-user targets irix,irixn32,irix64,solaris) 2018-03-10 17:05:57 +01:00
syscall.c linux-user: rename gettid() to sys_gettid() to avoid clash with glibc 2019-10-08 01:49:23 +00:00
syscall_defs.h fixes for building on 32 bit host systems 2019-07-23 05:52:29 +00:00
syscall_types.h linux-user: Add FICLONE and FICLONERANGE ioctls 2017-02-16 15:29:30 +01:00
target_flat.h
trace-events trace-events: fix code style: print 0x before hex numbers 2017-08-01 12:13:07 +01:00
uaccess.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
uname.c
uname.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
vm86.c