changeset 33560:6d7e7a2faf4b stable

Avoid build error with GCC 14 when targeting Windows. * liboctave/wrappers/unistd-wrappers.c (octave_execvp_wrapper): GCC 14 is stricter than previous versions when it comes to const-ness of function arguments. Cast to pointer with correct const-ness to avoid compilation error "incompatible-pointer-types" when targeting Windows.
author Markus Mützel <markus.muetzel@gmx.de>
date Fri, 10 May 2024 13:41:28 +0200
parents f852364698ed
children 3485012a415a 0698a2a8ed23
files liboctave/wrappers/unistd-wrappers.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/wrappers/unistd-wrappers.c	Wed May 08 14:52:16 2024 -0400
+++ b/liboctave/wrappers/unistd-wrappers.c	Fri May 10 13:41:28 2024 +0200
@@ -180,7 +180,11 @@
 int
 octave_execvp_wrapper (const char *file, char *const *argv)
 {
+#if defined (OCTAVE_USE_WINDOWS_API)
+  return execvp (file, (const char *const *) argv);
+#else
   return execvp (file, argv);
+#endif
 }
 
 pid_t