From: Biswapriyo Nath Date: Tue, 4 Apr 2023 18:45:21 +0000 (+0530) Subject: g-i: Fix compiling with mingw clang X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ad0e233e6f67f5b30810203b43b160e4c529f37;p=thirdparty%2Fvala.git g-i: Fix compiling with mingw clang This adds the return type with GetFullPathNameA declaration. Otherwise the following error is shown with clang 16 grealpath.h:29:19: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] --- diff --git a/gobject-introspection/grealpath.h b/gobject-introspection/grealpath.h index f5af7cb58..f8eadd66f 100644 --- a/gobject-introspection/grealpath.h +++ b/gobject-introspection/grealpath.h @@ -3,6 +3,14 @@ #include +#ifdef _WIN32 +/* We don't want to include as it clashes horribly + * with token names from scannerparser.h. So just declare + * GetFullPathNameA() here. + */ +extern unsigned long __stdcall GetFullPathNameA(const char*, unsigned long, char*, char**); +#endif + /** * g_realpath: * @@ -22,11 +30,6 @@ g_realpath (const char *path) else return NULL; #else - /* We don't want to include as it clashes horribly - * with token names from scannerparser.h. So just declare - * GetFullPathNameA() here. - */ - extern __stdcall GetFullPathNameA(const char*, int, char*, char**); char *buffer; char dummy; int rc, len;