On Mon, Jun 01, 2026 at 10:32:16PM +0200, Aurelien Jarno wrote:
> On 2026-02-22 17:16, Aurelien Jarno wrote:
> > The issue is due to ISO C23 declaration of bsearch, memchr, strchr,
> > strpbrk, strrchr, strstr, wcschr, wcspbrk, wcsrchr, wcsstr and wmemchr,
> > which now returns a pointer to a const-qualified type when the input
> > argument is a pointer to a const-qualified type [2].
>
> The issue is fixed by the following patch:
> https://github.com/vmware/open-vm-tools/pull/783
Applying this exposes the following problem, maybe introduced by the
new glib2.0?
In file included from /usr/include/glib-2.0/glib/glist.h:34,
from /usr/include/glib-2.0/glib/ghash.h:36,
from /usr/include/glib-2.0/glib.h:52,
from ../lib/rpcChannel/glib_stubs.c:28:
/usr/include/glib-2.0/glib/gmem.h:172:27: error: expected declaration
specifiers or '...' before '(' token
172 | (__builtin_object_size ((mem), 0) != ((size_t) - 1)) ?
\
| ^
../lib/rpcChannel/glib_stubs.c:38:6: note: in expansion of macro 'g_free'
38 | void g_free(void *p) { free(p); }
| ^~~~~~
/usr/include/glib-2.0/glib/gmem.h:172:34: error: expected declaration
specifiers or '...' before numeric constant
172 | (__builtin_object_size ((mem), 0) != ((size_t) - 1)) ?
\
| ^
../lib/rpcChannel/glib_stubs.c:38:6: note: in expansion of macro 'g_free'
38 | void g_free(void *p) { free(p); }
| ^~~~~~
/usr/include/glib-2.0/glib/gmem.h:172:37: error: expected ')' before '!=' token
172 | (__builtin_object_size ((mem), 0) != ((size_t) - 1)) ?
\
| ^~
../lib/rpcChannel/glib_stubs.c:38:6: note: in expansion of macro 'g_free'
38 | void g_free(void *p) { free(p); }
| ^~~~~~
Best,
Chris