• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/arptables/0004-Fix-musl-build-issue.patch
Jörg KrauseJörg Krause committed fdfd17c7e1902 Dec 2015
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
From cbf84a0bc377c6a368d30571f37ebfab27784697 Mon Sep 17 00:00:00 2001
2
From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
3
Date: Wed, 2 Dec 2015 04:57:33 +0100
4
Subject: [PATCH 4/4] Fix musl build issue
5
MIME-Version: 1.0
6
Content-Type: text/plain; charset=UTF-8
7
Content-Transfer-Encoding: 8bit
8
​
9
Due to clashes in the namespace between the Linux Kernel headers and the
10
netinet headers building arptables with the musl C library fails.
11
​
12
Best advice from the musl developers is to not include both headers in a
13
userspace tool (see the thread on the musl mailing list [1], especially [2]).
14
​
15
Since arptables only requires a few definitions from the Linux Kernel headers
16
we opt-out the clashing header files and define the needed definitions.
17
​
18
[1] http://www.openwall.com/lists/musl/2012/10/09/1
19
[2] http://www.openwall.com/lists/musl/2012/10/11/1
20
​
21
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
22
---
23
 extensions/arpt_CLASSIFY.c    |  7 +++++++
24
 include/linux/netfilter_arp.h | 11 +++++++++++
25
 2 files changed, 18 insertions(+)
26
​
27
diff --git a/extensions/arpt_CLASSIFY.c b/extensions/arpt_CLASSIFY.c
28
index cb5770b..c58129f 100644
29
--- a/extensions/arpt_CLASSIFY.c
30
+++ b/extensions/arpt_CLASSIFY.c
31
@@ -21,7 +21,14 @@
32
 #include <stdio.h>
33
 #include <getopt.h>
34
 #include <arptables.h>
35
+
36
+#ifdef __KERNEL__
37
 #include <linux/netfilter/xt_CLASSIFY.h>
38
+#else
39
+struct xt_classify_target_info {
40
+   uint32_t priority;
41
+};
42
+#endif
43
 
44
 #define TC_H_MAJ_MASK (0xFFFF0000U)
45
 #define TC_H_MIN_MASK (0x0000FFFFU)
46
diff --git a/include/linux/netfilter_arp.h b/include/linux/netfilter_arp.h
47
index 92bc6dd..2a63e82 100644
48
--- a/include/linux/netfilter_arp.h
49
+++ b/include/linux/netfilter_arp.h
50
@@ -5,7 +5,18 @@
51
  * (C)2002 Rusty Russell IBM -- This code is GPL.
52
  */
53
 
54
+#ifdef __KERNEL__
55
 #include <linux/netfilter.h>
56
+#else
57
+/* Responses from hook functions. */
58
+#define NF_DROP 0
59
+#define NF_ACCEPT 1
60
+#define NF_STOLEN 2
61
+#define NF_QUEUE 3
62
+#define NF_REPEAT 4
63
+#define NF_STOP 5
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.