X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fmeson.build;h=1d195cfa7254870386f597cc7e22adc4e5fb18c2;hb=d93d4f9dbd09bc5e53a9b5eeb1cc94939fee32bc;hp=e8c3e53ff8232a0ec25dcb10905e1117d984ad40;hpb=48dd371b2ec69f02870aa5e2a67fc8adb4617ff1;p=tinc diff --git a/src/meson.build b/src/meson.build index e8c3e53f..1d195cfa 100644 --- a/src/meson.build +++ b/src/meson.build @@ -18,6 +18,15 @@ foreach attr : ['malloc', 'nonnull', 'warn_unused_result', 'packed', 'format'] endif endforeach +if cc.compiles(''' + #include + 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; }