From ab9c0c9ca787da60ac9b956fdbcf4c1fa68c3300 Mon Sep 17 00:00:00 2001 From: Philipp Klaus Krause Date: Wed, 3 Nov 2021 11:54:51 +0100 Subject: [PATCH] Const qualify return of strerror Closes https://debbugs.gnu.org/cgi/bugreport.cgi?bug=43987 --- libguile/posix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libguile/posix.c b/libguile/posix.c index 31c4ab192..3ab12b99e 100644 --- a/libguile/posix.c +++ b/libguile/posix.c @@ -1299,7 +1299,7 @@ renumber_file_descriptor (int fd, int err) { /* At this point we are in the child process before exec. We cannot safely raise an exception in this environment. */ - char *msg = strerror (errno); + const char *msg = strerror (errno); fprintf (fdopen (err, "a"), "start_child: dup failed: %s\n", msg); _exit (127); /* Use exit status 127, as with other exec errors. */ } @@ -1383,7 +1383,7 @@ start_child (const char *exec_file, char **exec_argv, /* The exec failed! There is nothing sensible to do. */ { - char *msg = strerror (errno); + const char *msg = strerror (errno); fprintf (fdopen (2, "a"), "In execvp of %s: %s\n", exec_file, msg); }