0003-tests-define-__STDC_LIMIT_MACROS.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. From c971aaab74ca6e7d4ac3a06bd26e7309dfc5da45 Mon Sep 17 00:00:00 2001
  2. From: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
  3. Date: Mon, 22 Aug 2016 19:04:47 +0530
  4. Subject: [PATCH] tests: define __STDC_LIMIT_MACROS
  5. With glibc 2.16, we get following build error when building jack2:
  6. [193/247] cxx: tests/iodelay.cpp -> build/tests/iodelay.cpp.4.o
  7. ../tests/iodelay.cpp:171:43: error: 'UINT32_MAX' was not declared in this scope
  8. ../tests/iodelay.cpp:171:55: error: 'UINT32_MAX' was not declared in this scope
  9. ../tests/iodelay.cpp:172:44: error: 'UINT32_MAX' was not declared in this scope
  10. ../tests/iodelay.cpp:172:56: error: 'UINT32_MAX' was not declared in this scope
  11. In glibc 2.17 or older version, Header <stdint.h> defines these macros
  12. for C++ only if explicitly requested by defining __STDC_LIMIT_MACROS.
  13. We can't use <cstdint> since it requires C++11 standard.
  14. This build issue found by Buildroot autobuilder.
  15. http://autobuild.buildroot.net/results/369/369ce208ffea43dad75ba0a13469159b341e3bf5/
  16. Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
  17. ---
  18. tests/iodelay.cpp | 1 +
  19. 1 file changed, 1 insertion(+)
  20. diff --git a/tests/iodelay.cpp b/tests/iodelay.cpp
  21. index 1ef470f..f5c5836 100644
  22. --- a/tests/iodelay.cpp
  23. +++ b/tests/iodelay.cpp
  24. @@ -20,6 +20,7 @@
  25. #include <stdlib.h>
  26. #include <stdio.h>
  27. +#define __STDC_LIMIT_MACROS
  28. #include <stdint.h>
  29. #include <math.h>
  30. #include <unistd.h>
  31. --
  32. 2.6.2