gentoo-ebuilds/dev-build/kbuild/files/kbuild-0.1.9998.3499-int-conversion.patch
Viorel Munteanu b1a1b5d418
Move {dev-util → dev-build}/kbuild
Closes: https://github.com/gentoo/gentoo/pull/34871
Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
2024-01-17 20:27:38 +02:00

26 lines
719 B
Diff

Fix int to pointer conversion for clang
Note - this parameter was not actually used inside eval_buffer because of a define.
Bug: https://bugs.gentoo.org/875449
--- a/src/kmk/loadapi.c
+++ b/src/kmk/loadapi.c
@@ -20,6 +20,8 @@
#include "variable.h"
#include "dep.h"
+#include <string.h>
+
/* Allocate a buffer in our context, so we can free it. */
char *
gmk_alloc (unsigned int len)
@@ -59,7 +61,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 (strchr (s, 0) /** @todo suboptimal */));
free (s);
restore_variable_buffer (pbuf, plen);