Skip to contentSkip to conversation

filter: fix va_list build error

PATCH Applied Xi Wang 3 participants 4 messages May 1, 2013

Subsystems (4)
lore
Share & tools
lore

Xi Wang

author
#0 lore raw

PATCH 1/1 filter: fix va_list build error

This patch fixes the following build error.

In file included from include/linux/filter.h:52:0,

                 from arch/arm/net/bpf_jit_32.c:14:

include/linux/printk.h:54:2: error: unknown type name ‘va_list’ include/linux/printk.h:105:21: error: unknown type name ‘va_list’ include/linux/printk.h:108:30: error: unknown type name ‘va_list’

---
 include/linux/filter.h | 1 +
 1 file changed, 1 insertion(+)
include/linux/filter.h +1 -0
index d1248f4..c050dcc 100644
@@ -48,6 +48,7 @@ extern int sk_chk_filter(struct sock_filter *filter, unsigned int flen);
 extern int sk_get_filter(struct sock *sk, struct sock_filter __user *filter, unsigned len);
 
 #ifdef CONFIG_BPF_JIT
+#include <stdarg.h>
 #include <linux/linkage.h>
 #include <linux/printk.h>
 
Signature · 1 line
1.8.1.2
maintainer Applied
#1 lore raw

From: Xi Wang <[email protected]>
Date: Wed, 1 May 2013 16:24:08 -0400

Quoted 9 lines

This patch fixes the following build error.

In file included from include/linux/filter.h:52:0,

                 from arch/arm/net/bpf_jit_32.c:14:

include/linux/printk.h:54:2: error: unknown type name ‘va_list’ include/linux/printk.h:105:21: error: unknown type name ‘va_list’ include/linux/printk.h:108:30: error: unknown type name ‘va_list’

Applied, thanks.

#2 lore raw
In reply to Xi Wang
Quoted 18 lines · Xi Wang

This patch fixes the following build error.

In file included from include/linux/filter.h:52:0,

                  from arch/arm/net/bpf_jit_32.c:14:

include/linux/printk.h:54:2: error: unknown type name ‘va_list’ include/linux/printk.h:105:21: error: unknown type name ‘va_list’ include/linux/printk.h:108:30: error: unknown type name ‘va_list’

---
  include/linux/filter.h | 1 +
  1 file changed, 1 insertion(+)
include/linux/filter.h +0 -0
index d1248f4..c050dcc 100644

include/linux/filter.h extern int sk_chk_filter(struct sock_filter *filter, unsigned int flen); · line 53

Quoted 6 lines
include/linux/filter.h +1 -0
@@ -48,6 +48,7 @@ extern int sk_chk_filter(struct sock_filter *filter, unsigned int flen);
  extern int sk_get_filter(struct sock *sk, struct sock_filter __user *filter, unsigned len);
 
  #ifdef CONFIG_BPF_JIT
+#include <stdarg.h>
  #include <linux/linkage.h>
  #include <linux/printk.h>

That's a bit weird. Xi, maybe in a follow-up some time later, could you move the GCC-internal stdarg.h rather into linux/printk.h, since that's where the problem is coming from? Imho, it might be better off there, no?

author
#3 lore raw
Quoted 4 lines · Daniel Borkmann

That's a bit weird. Xi, maybe in a follow-up some time later, could you move the GCC-internal stdarg.h rather into linux/printk.h, since that's where the problem is coming from? Imho, it might be better off there, no?

There was some discussion a while ago on whether to make printk.h self contained or to disallow including it directly. Joe Perches [CCed] had patches for that.

https://lkml.org/lkml/2011/5/25/263

- xi