0001-libtests-cxx11.cc-fix-build-with-gcc-4.8.patch 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. From e70c2605a11d12a8eeee3e7eec46077956e11e1f Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Mon, 17 Feb 2020 22:36:08 +0100
  4. Subject: [PATCH] libtests/cxx11.cc: fix build with gcc 4.8
  5. Build fails on gcc 4.8 since version 9.1.1 and commit
  6. 752416554086d5d34323bc14164d5084db83cfbd:
  7. libtests/cxx11.cc: In function 'void do_regex()':
  8. libtests/cxx11.cc:347:42: error: 'strlen' is not a member of 'std'
  9. std::cregex_iterator m3(str7, str7 + std::strlen(str7), expr4);
  10. ^
  11. To fix the build failure, add missing include on cstring
  12. Fixes:
  13. - http://autobuild.buildroot.org/results/ad7fb68ae87850a85509eed80fd0cae8721b10c5
  14. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  15. [Upstream status: https://github.com/qpdf/qpdf/pull/400]
  16. ---
  17. libtests/cxx11.cc | 1 +
  18. 1 file changed, 1 insertion(+)
  19. diff --git a/libtests/cxx11.cc b/libtests/cxx11.cc
  20. index fa1dc6b..91ed7b1 100644
  21. --- a/libtests/cxx11.cc
  22. +++ b/libtests/cxx11.cc
  23. @@ -1,5 +1,6 @@
  24. #include <iostream>
  25. #include <cassert>
  26. +#include <cstring>
  27. #include <functional>
  28. #include <type_traits>
  29. #include <cstdint>
  30. --
  31. 2.24.1