device-observatory: Fix compilation with uClibc-ng
authorRosen Penev <redacted>
Wed, 1 May 2019 19:03:39 +0000 (12:03 -0700)
committerRosen Penev <redacted>
Wed, 1 May 2019 19:26:25 +0000 (12:26 -0700)
Two protocol definitions are missing. Took values from Musl.

Signed-off-by: Rosen Penev <redacted>
utils/device-observatory/Makefile
utils/device-observatory/patches/010-uClibc-ng.patch [new file with mode: 0644]

index 6970dad089df7e2e107950397fb8d8ca16ad2339..cc9c5796838ab5d27d37dc5d0ca8dcbe5e115c86 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=device-observatory
 PKG_VERSION:=1.2.0
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE_URL:=https://codeload.github.com/mwarning/device-observatory/tar.gz/v$(PKG_VERSION)?
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
diff --git a/utils/device-observatory/patches/010-uClibc-ng.patch b/utils/device-observatory/patches/010-uClibc-ng.patch
new file mode 100644 (file)
index 0000000..077a971
--- /dev/null
@@ -0,0 +1,22 @@
+--- a/src/parse_ether.c
++++ b/src/parse_ether.c
+@@ -21,10 +21,18 @@
+ #include "parse_ether.h"
+ /* tcpdump header (ether.h) defines ETHER_HDRLEN) */
+-#ifndef ETHER_HDRLEN 
++#ifndef ETHER_HDRLEN
+ #define ETHER_HDRLEN 14
+ #endif
++/* uClibc-ng compatibility */
++#ifndef IPPROTO_BEETPH
++#define IPPROTO_BEETPH        94
++#endif
++
++#ifndef IPPROTO_MPLS
++#define IPPROTO_MPLS  137
++#endif
+ const char *ip_protcol_str(int p)
+ {
git clone https://git.99rst.org/PROJECT