0002-configure-refactor-always_inline-detection.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. From 1d99ae25bb1bd4879c6f20f607faf3040018ee84 Mon Sep 17 00:00:00 2001
  2. From: Brendan Heading <brendanheading@gmail.com>
  3. Date: Thu, 30 Jul 2015 15:44:52 +0100
  4. Subject: [PATCH 2/3] configure: refactor always_inline detection
  5. Use configure.ac to detect the availability of the always_inline glibc
  6. macro, and define it only if it does not exist.
  7. Signed-off-by: Brendan Heading <brendanheading@gmail.com>
  8. ---
  9. configure.ac | 1 +
  10. kerncompat.h | 2 +-
  11. 2 files changed, 2 insertions(+), 1 deletion(-)
  12. diff --git a/configure.ac b/configure.ac
  13. index e936a10..d3d81a1 100644
  14. --- a/configure.ac
  15. +++ b/configure.ac
  16. @@ -41,6 +41,7 @@ AC_PATH_PROG([RMDIR], [rmdir], [rmdir])
  17. AC_CHECK_FUNCS([openat], [],
  18. [AC_MSG_ERROR([cannot find openat() function])])
  19. +AC_CHECK_DECLS([__always_inline])
  20. m4_ifndef([PKG_PROG_PKG_CONFIG],
  21. [m4_fatal([Could not locate the pkg-config autoconf
  22. diff --git a/kerncompat.h b/kerncompat.h
  23. index 8318665..757b9b4 100644
  24. --- a/kerncompat.h
  25. +++ b/kerncompat.h
  26. @@ -32,7 +32,7 @@
  27. #include <features.h>
  28. -#ifndef __GLIBC__
  29. +#ifndef HAVE_DECL___ALWAYS_INLINE
  30. #define __always_inline __inline __attribute__ ((__always_inline__))
  31. #endif
  32. --
  33. 2.4.3