aboutsummaryrefslogtreecommitdiff
path: root/sim/common
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-05-01 16:30:59 -0400
committerMike Frysinger <vapier@gentoo.org>2021-05-01 16:37:39 -0400
commitfe3486178040db782f18d67a95a1e63bdf68eedf (patch)
tree1445ff740a5f797e32834a3df73c0b790fef1345 /sim/common
parent2a83fd8f4806f8580d86057dc00bfdb5efcfa1f6 (diff)
downloadgdb-fe3486178040db782f18d67a95a1e63bdf68eedf.zip
gdb-fe3486178040db782f18d67a95a1e63bdf68eedf.tar.gz
gdb-fe3486178040db782f18d67a95a1e63bdf68eedf.tar.bz2
sim: nrun: add local strsignal prototype
While libiberty provides a definition for this for systems that lack the function (e.g. Windows), it doesn't provide a prototype. So add our own local copy in the one file that uses the func.
Diffstat (limited to 'sim/common')
-rw-r--r--sim/common/ChangeLog4
-rw-r--r--sim/common/nrun.c5
2 files changed, 9 insertions, 0 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 9775f41..3983e24 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,5 +1,9 @@
2021-05-01 Mike Frysinger <vapier@gentoo.org>
+ * nrun.c (strsignal): New prototype.
+
+2021-05-01 Mike Frysinger <vapier@gentoo.org>
+
* callback.c (wrap): Delete.
(os_close): Replace wrap call with direct call & setting last_errno.
(os_isatty, os_lseek, os_read_stdin, os_write, os_rename, os_system,
diff --git a/sim/common/nrun.c b/sim/common/nrun.c
index 0caa820..1ceb083 100644
--- a/sim/common/nrun.c
+++ b/sim/common/nrun.c
@@ -28,6 +28,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "bfd.h"
+#ifndef HAVE_STRSIGNAL
+/* While libiberty provides a fallback, it doesn't provide a prototype. */
+extern const char *strsignal (int);
+#endif
+
#ifdef HAVE_ENVIRON
extern char **environ;
#endif