cdata.set('HAVE_' + os_name.to_upper(), 1)
-foreach attr : ['malloc', 'nonnull', 'warn_unused_result', 'packed']
+foreach attr : ['malloc', 'nonnull', 'warn_unused_result', 'packed', 'format']
if cc.has_function_attribute(attr)
cdata.set('HAVE_ATTR_' + attr.to_upper(), 1,
- description: '__attribute__(@0@)'.format(attr))
+ description: '__attribute__((__@0@__))'.format(attr))
endif
endforeach