From: Dave Jones <davej@codemonkey.org.uk>
To: Jan Stancek <jstancek@redhat.com>
Cc: trinity@vger.kernel.org
Subject: Re: [PATCH] fix build when USE_BPF is not defined
Date: Mon, 7 Nov 2016 09:34:35 -0500 [thread overview]
Message-ID: <20161107143434.k54git2ujrkzrwly@codemonkey.org.uk> (raw)
In-Reply-To: <dc2c60882d0fe97a0c956dd856d74aa3347a3e5f.1478519712.git.jstancek@redhat.com>
On Mon, Nov 07, 2016 at 12:58:34PM +0100, Jan Stancek wrote:
> net/bpf.o: In function `bpf_gen_filter': bpf.c:852: undefined reference to `get_rand_bpf_fd'
>
> Signed-off-by: Jan Stancek <jstancek@redhat.com>
> ---
> net/bpf.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/net/bpf.c b/net/bpf.c
> index 4fe941733016..bb07a777abe9 100644
> --- a/net/bpf.c
> +++ b/net/bpf.c
> @@ -8,6 +8,7 @@
> #include <string.h>
>
> #include "bpf.h"
> +#include "config.h"
> #include "debug.h"
> #include "log.h"
> #include "net.h"
> @@ -849,8 +850,10 @@ void bpf_gen_filter(unsigned long **addr, unsigned long *addrlen)
> switch (rnd() % 3) {
> case 0: bpf->filter[i].k = (uint32_t) rand32();
> break;
> +#ifdef USE_BPF
> case 1: bpf->filter[i].k = (uint32_t) get_rand_bpf_fd();
> break;
> +#endif
I think it might be better if we wrap all of net/bpf.c in this ifdef,
and then add additional ones wherever we call bpf_gen_filter.
(Right now only two places iirc)
Dave
next prev parent reply other threads:[~2016-11-07 14:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-07 11:58 [PATCH] fix build when USE_BPF is not defined Jan Stancek
2016-11-07 14:34 ` Dave Jones [this message]
2016-11-08 10:46 ` Jan Stancek
2016-11-08 15:00 ` Dave Jones
2016-11-08 15:08 ` Jan Stancek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161107143434.k54git2ujrkzrwly@codemonkey.org.uk \
--to=davej@codemonkey.org.uk \
--cc=jstancek@redhat.com \
--cc=trinity@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.