[glib] Meson: Use cc.has_type() instead of our own snippet



commit 30c2ea4c530302031e1bdda9787609a03f270c25
Author: Xavier Claessens <xavier claessens collabora com>
Date:   Fri Apr 20 12:07:59 2018 -0400

    Meson: Use cc.has_type() instead of our own snippet
    
    https://bugzilla.gnome.org/show_bug.cgi?id=740791

 gio/meson.build | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gio/meson.build b/gio/meson.build
index f1faf0b3e..6028f3b7f 100644
--- a/gio/meson.build
+++ b/gio/meson.build
@@ -137,10 +137,8 @@ if host_system != 'windows'
     glib_conf.set('HAVE_RES_NQUERY', 1)
   endif
 
-  if cc.compiles('''#include <netinet/in.h>
-                    struct ip_mreqn foo;''',
-                 name : 'struct ip_mreqn')
-    glib_conf.set('HAVE_IP_MREQN', '/**/')
+  if cc.has_type('struct ip_mreqn', prefix : '#include <netinet/in.h>')
+    glib_conf.set('HAVE_IP_MREQN', 1)
   endif
 
   if cc.compiles('''#include <sys/ioctl.h>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]