glib_stubs: undefine g_free - #796
Conversation
otherwise compiler tries to expand the macro to a function. Noticed with
glib >= 2.84.4
```
In file included from /build/amd64-usr/usr/include/glib-2.0/glib/glist.h:34,
from /build/amd64-usr/usr/include/glib-2.0/glib/ghash.h:36,
from /build/amd64-usr/usr/include/glib-2.0/glib.h:52,
from ../lib/rpcChannel/glib_stubs.c:28:
/build/amd64-usr/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); }
| ^~~~~~
/build/amd64-usr/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); }
| ^~~~~~
/build/amd64-usr/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); }
```
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
🛑 Legal Compliance Check FailedHi @tormath1, thank you for your contribution! To merge this Pull Request, you must sign our CLA. Note: Even if you signed off your commits locally (using 1. Read the Document: Click here to read the CLA ⏳ Processing Schedule: |
|
I have read the CLA Document and I hereby sign the CLA for this and all future contributions. |
|
@aabusair maybe this could be merged now that the CLA issue is solved? |
otherwise compiler tries to expand the macro to a function. Noticed with glib >= 2.84.4