]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
sim: ppc: cleanup getrusage decls
authorMike Frysinger <vapier@gentoo.org>
Tue, 5 Dec 2023 04:32:51 +0000 (23:32 -0500)
committerMike Frysinger <vapier@gentoo.org>
Tue, 5 Dec 2023 04:36:20 +0000 (23:36 -0500)
commita3d3d9a7d9e0d5bf6168180f4f1b68ed37968f94
tree6c55138b528e340f8d4297cf305b635dc33b6ef3
parent21a2a3d567a2af583768b5f614403e65611c58a5
sim: ppc: cleanup getrusage decls

Don't conflate HAVE_GETRUSAGE & HAVE_SYS_RESOURCE_H.  Use the latter
to include the header and nothing else.  Use the former to determine
whether to use the function and nothing else.  If we find a system
that doesn't follow POSIX and provides only one of these, we can
figure out how to support it then.  The manual local definition is
clashing with the system ones and leading to build failures with
newer C standards.

sim/ppc/emul_netbsd.c:51:5: error: a function declaration without a
prototype is deprecated in all versions of C and is treated as a
zero-parameter prototype in C2x, conflicting with a previous
declaration [-Werror,-Wdeprecated-non-prototype]
sim/ppc/emul_netbsd.c
sim/ppc/emul_unix.c
sim/ppc/mon.c