[PATCH v2] Unconditionally declare strsignal
Christian Biesinger
cbiesinger@google.com
Wed Oct 27 16:41:22 GMT 2021
Currently, newlib does not declare strsignal if DEFS_H is defined,
ostensibly to work around a gdb bug. However, gdb itself compiles
even with this ifndef removed, and this makes sim (another part of
gdb) fail to compile.
Since it is not clear exactly what issue this was working around,
this patch just replaces that ifdef with the correct check,
i.e. __POSIX_VISIBLE >= 200809.
---
newlib/libc/include/string.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/newlib/libc/include/string.h b/newlib/libc/include/string.h
index 60e837bc0..32199c027 100644
--- a/newlib/libc/include/string.h
+++ b/newlib/libc/include/string.h
@@ -130,7 +130,7 @@ char *strlwr (char *);
char *strupr (char *);
#endif
-#ifndef DEFS_H /* Kludge to work around problem compiling in gdb */
+#if __POSIX_VISIBLE >= 200809
char *strsignal (int __signo);
#endif
--
2.33.0.1079.g6e70778dc9-goog
More information about the Newlib
mailing list