Thread (4 messages) flat view 4 messages, 3 authors, 2016-02-03

Re: [PATCH iproute2] tc: fix compilation with old gcc (< 4.6) (bis)

From: Nicolas Dichtel <hidden>
Date: 2016-02-02 10:39:48

Possibly related (same subject, not in this thread)

Le 02/02/2016 10:08, Daniel Borkmann a écrit :
On 02/02/2016 05:51 AM, Stephen Hemminger wrote:
quoted
On Tue, 19 Jan 2016 11:01:45 +0000
Nicolas Dichtel [off-list ref] wrote:
quoted
diff --git a/tc/tc_bpf.c b/tc/tc_bpf.c
index 42c8841869f5..219ffa582c1a 100644
--- a/tc/tc_bpf.c
+++ b/tc/tc_bpf.c
@@ -49,6 +49,10 @@
  #include "tc_util.h"
  #include "tc_bpf.h"

+#ifndef AF_ALG
+#define AF_ALG 38
+#endif
Why is this here? AF_ALG is not used anywhere in this code.
It is used, this patch is fine as-is.
Yes, it's used and not defined with old toolchains:
$ git grep AF_ALG
tc/tc_bpf.c:#ifndef AF_ALG
tc/tc_bpf.c:#define AF_ALG 38
tc/tc_bpf.c:            .salg_family    = AF_ALG,
tc/tc_bpf.c:    cfd = socket(AF_ALG, SOCK_SEQPACKET, 0);
tc/tc_bpf.c:            fprintf(stderr, "Cannot get AF_ALG socket: %s\n",

Regards,
Nicolas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help