Compiling with Clang (11.0, --buildtype=debug) for Windows
produces deprecated warnings related to secure crt functions.

Disable this by defining -D_CRT_SECURE_NO_WARNINGS.

It is unclear exactly which commit this fixes.  It is probably a
consequence of building more libraries for Windows.

Signed-off-by: Nick Connolly <nick.conno...@mayadata.io>
---
 config/meson.build | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/config/meson.build b/config/meson.build
index c02802c18..a3154e29c 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -279,6 +279,11 @@ if is_windows
                add_project_arguments('-D__USE_MINGW_ANSI_STDIO', language: 'c')
        endif
 
+       # Disable secure CRT deprecated warnings for clang
+       if cc.get_id() == 'clang'
+               add_project_arguments('-D_CRT_SECURE_NO_WARNINGS', language: 
'c')
+       endif
+
        add_project_link_arguments('-lws2_32', language: 'c')
 
        # Contrary to docs, VirtualAlloc2() is exported by mincore.lib
-- 
2.25.1

Reply via email to