Message ID | 1570551675-22643-1-git-send-email-gvrose8192@gmail.com |
---|---|
State | Accepted |
Commit | 9048ab600b1004476d5ba9496ba3448c192ac7e0 |
Headers | show |
Series | [ovs-dev] acinclude: Fix false positive search for prandom_u32 | expand |
LGTM, thanks Greg for the fix. Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com> On Tue, Oct 8, 2019 at 9:21 AM Greg Rose <gvrose8192@gmail.com> wrote: > > Searching random.h for prandom_u32 will also match when prandom_u32_max > is present and cause a false positive HAVE_PRANDOM_U32. Fix this up > by looking for the parenthesis following prandom_u32 so it won't > match on prandom_u32_max. > > Passes Travis: > https://travis-ci.org/gvrose8192/ovs-experimental/builds/595171808 > > Signed-off-by: Greg Rose <gvrose8192@gmail.com> > --- > acinclude.m4 | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/acinclude.m4 b/acinclude.m4 > index c729266..066c134 100644 > --- a/acinclude.m4 > +++ b/acinclude.m4 > @@ -723,7 +723,9 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ > [\(*nf_ct_timeout_find_get_hook\)], [net], > [OVS_DEFINE([HAVE_NF_CT_TIMEOUT_FIND_GET_HOOK_NET])]) > > - OVS_GREP_IFELSE([$KSRC/include/linux/random.h], [prandom_u32]) > + OVS_GREP_IFELSE([$KSRC/include/linux/random.h], > + [prandom_u32[[\(]]], > + [OVS_DEFINE([HAVE_PRANDOM_U32])]) > OVS_GREP_IFELSE([$KSRC/include/linux/random.h], [prandom_u32_max]) > > OVS_GREP_IFELSE([$KSRC/include/net/rtnetlink.h], [get_link_net]) > -- > 1.8.3.1 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
On Tue, Oct 08, 2019 at 09:21:15AM -0700, Greg Rose wrote: > Searching random.h for prandom_u32 will also match when prandom_u32_max > is present and cause a false positive HAVE_PRANDOM_U32. Fix this up > by looking for the parenthesis following prandom_u32 so it won't > match on prandom_u32_max. > > Passes Travis: > https://travis-ci.org/gvrose8192/ovs-experimental/builds/595171808 > > Signed-off-by: Greg Rose <gvrose8192@gmail.com> Thanks, applied to master.
diff --git a/acinclude.m4 b/acinclude.m4 index c729266..066c134 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -723,7 +723,9 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ [\(*nf_ct_timeout_find_get_hook\)], [net], [OVS_DEFINE([HAVE_NF_CT_TIMEOUT_FIND_GET_HOOK_NET])]) - OVS_GREP_IFELSE([$KSRC/include/linux/random.h], [prandom_u32]) + OVS_GREP_IFELSE([$KSRC/include/linux/random.h], + [prandom_u32[[\(]]], + [OVS_DEFINE([HAVE_PRANDOM_U32])]) OVS_GREP_IFELSE([$KSRC/include/linux/random.h], [prandom_u32_max]) OVS_GREP_IFELSE([$KSRC/include/net/rtnetlink.h], [get_link_net])
Searching random.h for prandom_u32 will also match when prandom_u32_max is present and cause a false positive HAVE_PRANDOM_U32. Fix this up by looking for the parenthesis following prandom_u32 so it won't match on prandom_u32_max. Passes Travis: https://travis-ci.org/gvrose8192/ovs-experimental/builds/595171808 Signed-off-by: Greg Rose <gvrose8192@gmail.com> --- acinclude.m4 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)