sim: cris: fix C tests with newer toolchains
authorMike Frysinger <vapier@gentoo.org>
Thu, 7 Jan 2021 06:18:08 +0000 (01:18 -0500)
committerMike Frysinger <vapier@gentoo.org>
Thu, 7 Jan 2021 06:19:49 +0000 (01:19 -0500)
commit1861f7cfbf7d3a2bf1c7746dc2c95b09fa351891
tree7c08075755cb46d35a4607a51444b9fdc3fbc8ef
parent2652cfad8d9d6ab05fe6296802ec499682a00749
sim: cris: fix C tests with newer toolchains

Make sure we include unistd.h for getpid prototypes to fix build
warnings/errors with newer compilers & C libraries.

Doing that for close in openpf highlights these were using the
wrong function -- need to use fclose on FILE*, not close.

These tests pass again with a cris-elf toolchain.
sim/testsuite/sim/cris/ChangeLog
sim/testsuite/sim/cris/c/kill2.c
sim/testsuite/sim/cris/c/openpf1.c
sim/testsuite/sim/cris/c/openpf2.c
sim/testsuite/sim/cris/c/pipe1.c
sim/testsuite/sim/cris/c/sched1.c
sim/testsuite/sim/cris/c/sched2.c
sim/testsuite/sim/cris/c/sched3.c
sim/testsuite/sim/cris/c/sched4.c
sim/testsuite/sim/cris/c/sig5.c
sim/testsuite/sim/cris/c/sig8.c