SHA256
1
0
forked from pool/kbuild
kbuild/kBuild-c99-2.patch
Martin Pluskal c9849735bd Accepting request 1179185 from home:jamborm:gcc14fixes
- Make kbuild buildable with GCC 14 (boo#1225792)
  * Changes to configure machinery so that it does not fail and detect
    what it has detected with previous GCC versions.
    (kBuild-configure-c99.patch, kBuild-configure-c99-2.patch)
  * Add many missing includes (kBuild-c99.patch).
  * Fix an actual bug in a call to eval_buffer that also manifests as
    a C99 violation (kBuild-c99-2.patch).

OBS-URL: https://build.opensuse.org/request/show/1179185
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/kbuild?expand=0&rev=56
2024-06-07 11:27:03 +00:00

17 lines
599 B
Diff

The eval_buffer function expects the end of the string as the
(optional) last argument, not its length.
Index: src/kmk/loadapi.c
===================================================================
--- src/kmk/loadapi.c (revision 3600)
+++ src/kmk/loadapi.c (working copy)
@@ -59,7 +59,7 @@
install_variable_buffer (&pbuf, &plen);
s = xstrdup (buffer);
- eval_buffer (s, flp IF_WITH_VALUE_LENGTH_PARAM (strlen (s) /** @todo suboptimal */));
+ eval_buffer (s, flp IF_WITH_VALUE_LENGTH_PARAM (s + strlen (s) /** @todo suboptimal */));
free (s);
restore_variable_buffer (pbuf, plen);