third_party: Build pypamtest with -Wno-error=declaration-after-statement
[samba.git] / buildtools / wafsamba / samba_autoconf.py
index 8541d003e2a5b2274c5c31702a7ce70fe905d7eb..34fd5fab2c0bd955cc80d1c40073c87bc681a27c 100644 (file)
@@ -817,6 +817,9 @@ int main(void) {
         if CHECK_CFLAGS(conf, ["-Wno-error=array-bounds"]):
             conf.define('HAVE_WNO_ERROR_ARRAY_BOUNDS', 1)
 
+        if CHECK_CFLAGS(conf, ["-Wno-error=declaration-after-statement"]):
+            conf.define('HAVE_WNO_ERROR_DECLARATION_AFTER_STATEMENT', 1)
+
         if not Options.options.disable_warnings_as_errors:
             conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Werror -Wno-error=deprecated-declarations', testflags=True)
             conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Wno-error=tautological-compare', testflags=True)