From: Ralf Habacker Date: Sat, 20 Mar 2010 20:11:10 +0000 (+0100) Subject: Fixed gcc on windows limitation X-Git-Tag: dbus-1.3.1~84 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=235e8dfe2e1b741bbe117825f6d3fc26fc94ca6f;p=thirdparty%2Fdbus.git Fixed gcc on windows limitation A pointer to a function or variable marked as dllimport cannot be used as a constant address. --- diff --git a/bus/config-loader-expat.c b/bus/config-loader-expat.c index 51bbb51bd..b571fda31 100644 --- a/bus/config-loader-expat.c +++ b/bus/config-loader-expat.c @@ -26,12 +26,7 @@ #include #include -static XML_Memory_Handling_Suite memsuite = -{ - dbus_malloc, - dbus_realloc, - dbus_free -}; +static XML_Memory_Handling_Suite memsuite; typedef struct { @@ -196,7 +191,11 @@ bus_config_load (const DBusString *file, _dbus_string_free (&context.content); return NULL; } - + + memsuite.malloc_fcn = dbus_malloc; + memsuite.realloc_fcn = dbus_realloc; + memsuite.free_fcn = dbus_free; + expat = XML_ParserCreate_MM ("UTF-8", &memsuite, NULL); if (expat == NULL) {