Skip to content

Instantly share code, notes, and snippets.

@rkitover
Created June 1, 2025 02:46
Show Gist options
  • Save rkitover/72d91593cd6d09e686f82e342a0521db to your computer and use it in GitHub Desktop.
Save rkitover/72d91593cd6d09e686f82e342a0521db to your computer and use it in GitHub Desktop.
GLib build fix for macOS
--- glib-2.78.3/meson.build 2023-12-06 19:03:55
+++ glib/meson.build 2025-05-19 15:12:51
@@ -534,7 +519,7 @@
# Due to pervasive use of things like GPOINTER_TO_UINT(), we do not support
# building with -Wbad-function-cast.
'-Wno-bad-function-cast',
- '-Werror=implicit-function-declaration',
+ '-Wno-error=implicit-function-declaration',
'-Werror=missing-prototypes',
'-Werror=pointer-sign',
'-Wno-string-plus-int',
--- glib-2.78.3/gio/meson.build 2023-12-06 19:03:55
+++ glib/gio/meson.build 2025-05-19 15:12:51
@@ -40,6 +40,7 @@
network_libs = [ ]
network_args = [ ]
if host_system != 'windows'
+if host_system != 'darwin'
# res_query()
res_query_test = '''#include <resolv.h>
int main (int argc, char ** argv) {
@@ -63,6 +64,10 @@
error('Could not find res_query()')
endif
endif
+else
+ network_libs += [ cc.find_library('resolv') ]
+ network_args += [ '-lresolv' ]
+endif
# socket()
socket_test = '''#include <sys/types.h>
@@ -151,7 +156,6 @@
name : 'ioctl with request SIOCGIFADDR')
glib_conf.set('HAVE_SIOCGIFADDR', '/**/')
endif
-
endif
if host_system == 'android'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment