0002-include-wampcc-platform.h-fix-build-with-musl-1.2.0.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. From 9c2559434b752df3dc8460ee242d321670a40847 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Mon, 1 Jun 2020 11:41:54 +0200
  4. Subject: [PATCH] include/wampcc/platform.h: fix build with musl 1.2.0
  5. Fix the following build failure on musl 1.2.0 due to time_t being on 64
  6. bits:
  7. /home/naourr/work/instance-0/output-1/build/wampcc-1.6/libs/wampcc/utils.cc: In function 'std::__cxx11::string wampcc::local_timestamp()':
  8. /home/naourr/work/instance-0/output-1/build/wampcc-1.6/libs/wampcc/utils.cc:205:15: error: cannot convert 'wampcc::time_val::type_type*' {aka 'long int*'} to 'const time_t*' {aka 'const long long int*'}
  9. localtime_r(&now.sec, &parts);
  10. ^~~~~~~~
  11. Fixes:
  12. - http://autobuild.buildroot.org/results/da996e189220499b85efbdb541a891ac18db38c6
  13. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  14. [Upstream status: https://github.com/darrenjs/wampcc/pull/62]
  15. ---
  16. include/wampcc/platform.h | 2 +-
  17. 1 file changed, 1 insertion(+), 1 deletion(-)
  18. diff --git a/include/wampcc/platform.h b/include/wampcc/platform.h
  19. index 24d0868..aebf950 100644
  20. --- a/include/wampcc/platform.h
  21. +++ b/include/wampcc/platform.h
  22. @@ -27,7 +27,7 @@ namespace wampcc
  23. struct time_val
  24. {
  25. #ifndef _WIN32
  26. - typedef long type_type;
  27. + typedef time_t type_type;
  28. #else
  29. typedef __time64_t type_type;
  30. #endif
  31. --
  32. 2.26.2