Skip to content

Commit

Permalink
acinclude: Fix build with kernels with prandom* moved to prandom.h.
Browse files Browse the repository at this point in the history
Recent commit c0842fbc1b18 ("random32: move the pseudo-random 32-bit
definitions to prandom.h") in upstream kernel moved the definition
of prandom_* functions from random.h to prandom.h.  This change was
also backported to stable kernels.

Fixing our configure script to look for these functions in a new
location and avoid build failures:

  datapath/linux/compat/include/linux/random.h:11:19:
    error: redefinition of 'prandom_u32_max'

Acked-by: Greg Rose <gvrose8192@gmail.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
  • Loading branch information
igsilya committed Aug 12, 2020
1 parent 218ab4f commit e38b412
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,10 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
OVS_GREP_IFELSE([$KSRC/include/linux/random.h], [prandom_u32])
OVS_GREP_IFELSE([$KSRC/include/linux/random.h], [prandom_u32_max])
OVS_GREP_IFELSE([$KSRC/include/linux/prandom.h],
[prandom_u32[[\(]]],
[OVS_DEFINE([HAVE_PRANDOM_U32])])
OVS_GREP_IFELSE([$KSRC/include/linux/prandom.h], [prandom_u32_max])
OVS_GREP_IFELSE([$KSRC/include/net/rtnetlink.h], [get_link_net])
OVS_GREP_IFELSE([$KSRC/include/net/rtnetlink.h], [name_assign_type])
Expand Down

0 comments on commit e38b412

Please sign in to comment.