nss_wrapper: Add missing check for printf format validation
[samba.git] / lib / nss_wrapper / wscript
index d53accbeea8386743ca321ece6bdc171bca4ca18..113d99ffbe0f9e4bfb0e7bd78d5f8e73f8bf9fc7 100644 (file)
@@ -40,6 +40,18 @@ def configure(conf):
             addmain=False,
             msg='Checking for library destructor support')
 
+        # check HAVE_ATTRIBUTE_PRINTF_FORMAT
+        conf.CHECK_CODE('''
+            void log_fn(const char *format, ...) __attribute__ ((format (printf, 1, 2)));
+
+            int main(void) {
+                return 0;
+            }
+            ''',
+            'HAVE_ATTRIBUTE_PRINTF_FORMAT',
+            addmain=False,
+            msg='Checking for printf format validation support')
+
         conf.CHECK_FUNCS('gethostbyaddr_r gethostbyname_r')
         # Solaris
         conf.CHECK_FUNCS('__posix_getpwnam_r __posix_getpwuid_r')