Include mbedtls/platform_time.h conditionally on MBEDTLS_HAVE_TIME

Work around https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/393

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
diff --git a/scripts/generate_query_config.pl b/scripts/generate_query_config.pl
index e99d633..49e363d 100755
--- a/scripts/generate_query_config.pl
+++ b/scripts/generate_query_config.pl
@@ -121,7 +121,11 @@
     map {s!^\Q$root/!!} @paths;
     # Exclude some headers that are included by build_info.h and cannot
     # be included directly.
-    push @header_files, grep {!m!_config\.h|[/_]adjust[/_]!} @paths;
+    push @header_files, grep {!m[
+            ^mbedtls/platform_time\.h$ | # errors without time.h
+            _config\.h |
+            [/_]adjust[/_]
+        ]x} @paths;
 }
 my $include_headers = join('', map {"#include <$_>\n"} @header_files);