commit 311ad52: [Minor] Check version header that is absent sometimes

Vsevolod Stakhov vsevolod at rspamd.com
Mon Jul 18 16:49:03 UTC 2022


Author: Vsevolod Stakhov
Date: 2022-07-18 17:43:31 +0100
URL: https://github.com/rspamd/rspamd/commit/311ad52ad6f0b11811412c1dc17679fc24356c90 (HEAD -> master)

[Minor] Check version header that is absent sometimes

---
 src/libserver/symcache/symcache_impl.cxx | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/libserver/symcache/symcache_impl.cxx b/src/libserver/symcache/symcache_impl.cxx
index 8ffc55db0..28db9aaa9 100644
--- a/src/libserver/symcache/symcache_impl.cxx
+++ b/src/libserver/symcache/symcache_impl.cxx
@@ -24,7 +24,11 @@
 #include "fmt/core.h"
 #include "contrib/t1ha/t1ha.h"
 
-#include <version>
+#ifdef __has_include
+# if __has_include(<version>)
+#   include <version>
+# endif
+#endif
 #include <cmath>
 
 namespace rspamd::symcache {


More information about the Commits mailing list