You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.7 KiB

  1. From f639ec9b25b2758a07d214f7755f1ae0f764e949 Mon Sep 17 00:00:00 2001
  2. Message-Id: <f639ec9b25b2758a07d214f7755f1ae0f764e949.1597434688.git.mschiffer@universe-factory.net>
  3. From: Ilya Maximets <i.maximets@ovn.org>
  4. Date: Wed, 12 Aug 2020 10:57:07 +0200
  5. Subject: [PATCH] acinclude: Fix build with kernels with prandom* moved to
  6. prandom.h.
  7. Recent commit c0842fbc1b18 ("random32: move the pseudo-random 32-bit
  8. definitions to prandom.h") in upstream kernel moved the definition
  9. of prandom_* functions from random.h to prandom.h. This change was
  10. also backported to stable kernels.
  11. Fixing our configure script to look for these functions in a new
  12. location and avoid build failures:
  13. datapath/linux/compat/include/linux/random.h:11:19:
  14. error: redefinition of 'prandom_u32_max'
  15. Acked-by: Greg Rose <gvrose8192@gmail.com>
  16. Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
  17. (cherry picked from commit 0047ca3a0290f1ef954f2c76b31477cf4b9755f5)
  18. ---
  19. acinclude.m4 | 4 ++++
  20. 1 file changed, 4 insertions(+)
  21. diff --git a/acinclude.m4 b/acinclude.m4
  22. index b474422f52c8..7f028836f54c 100644
  23. --- a/acinclude.m4
  24. +++ b/acinclude.m4
  25. @@ -781,6 +781,10 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
  26. [prandom_u32[[\(]]],
  27. [OVS_DEFINE([HAVE_PRANDOM_U32])])
  28. OVS_GREP_IFELSE([$KSRC/include/linux/random.h], [prandom_u32_max])
  29. + OVS_GREP_IFELSE([$KSRC/include/linux/prandom.h],
  30. + [prandom_u32[[\(]]],
  31. + [OVS_DEFINE([HAVE_PRANDOM_U32])])
  32. + OVS_GREP_IFELSE([$KSRC/include/linux/prandom.h], [prandom_u32_max])
  33. OVS_GREP_IFELSE([$KSRC/include/net/rtnetlink.h], [get_link_net])
  34. OVS_GREP_IFELSE([$KSRC/include/net/rtnetlink.h], [name_assign_type])
  35. --
  36. 2.28.0