Improve use of compiler attributes
[tinc] / src / meson.build
index c780ba1..1d195cf 100644 (file)
@@ -18,6 +18,15 @@ foreach attr : ['malloc', 'nonnull', 'warn_unused_result', 'packed', 'format']
   endif
 endforeach
 
+if cc.compiles('''
+    #include <stdlib.h>
+    extern void *make() __attribute__((malloc(free)));
+    int main(void) { return 0; }
+''')
+  cdata.set('HAVE_ATTR_MALLOC_WITH_ARG', 1,
+            description: 'support for __attribute__((malloc(deallocator)))')
+endif
+
 if cc.compiles('''
     _Static_assert(1, "ok");
     int main(void) { return 0; }
@@ -106,6 +115,7 @@ subdir('chacha-poly1305')
 
 src_lib_common = [
   'conf.c',
+  'console.c',
   'dropin.c',
   'keys.c',
   'list.c',