diff --git a/Sources/CGLib/glib_bridging.h b/Sources/CGLib/glib_bridging.h index 9c2dce22..3219913d 100644 --- a/Sources/CGLib/glib_bridging.h +++ b/Sources/CGLib/glib_bridging.h @@ -1,12 +1,20 @@ #ifdef __linux__ #include #include -extern int g_open (const char *, int, ...) __nonnull ((1)); +#ifdef __aarch64__ +extern int g_open(const char *, int, int) __nonnull ((1)); +#define g_open g_open_orig +#else +extern int g_open(const char *, int, ...) __nonnull ((1)); +#endif #endif #define __GLIB_H_INSIDE__ #include #include #undef __GLIB_H_INSIDE__ +#if defined(__linux__) && defined(__aarch64__) +#undef g_open +#endif struct _GAllocator {}; struct _GAsyncQueue {}; diff --git a/Sources/GLib/GLib.swift b/Sources/GLib/GLib.swift index 7bb82ef5..8d7cdc09 100644 --- a/Sources/GLib/GLib.swift +++ b/Sources/GLib/GLib.swift @@ -390,3 +390,18 @@ public func g_utime(_ path: UnsafePointer, _ times: UnsafePointer) -> CInt { + g_set_prgname(name) + return 0 +} +#endif \ No newline at end of file