fix-build-under-clang-msabi.patch 583 B

123456789101112131415161718192021222324252627
  1. From 0f049b61b6f611ed6d3b8c44b4f1232290936aa3 Mon Sep 17 00:00:00 2001
  2. From: Redbeanw44602 <[email protected]>
  3. Date: Thu, 2 Jan 2025 22:03:20 +0800
  4. Subject: [PATCH] fix build under clang/msabi.
  5. ---
  6. db/c.cc | 4 ++++
  7. 1 file changed, 4 insertions(+)
  8. diff --git a/db/c.cc b/db/c.cc
  9. index 8bdde38..8c6418a 100644
  10. --- a/db/c.cc
  11. +++ b/db/c.cc
  12. @@ -19,6 +19,10 @@
  13. #include "leveldb/status.h"
  14. #include "leveldb/write_batch.h"
  15. +#if defined(_MSC_VER)
  16. +#define strdup _strdup
  17. +#endif
  18. +
  19. using leveldb::Cache;
  20. using leveldb::Comparator;
  21. using leveldb::CompressionType;
  22. --
  23. 2.47.1