Browse Source

net-snmp: fix musl compatibility

Fixup `iwlib.h` to not consider an musl environment to be an unsupported
platform.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Jo-Philipp Wich 9 years ago
parent
commit
fdde981522
2 changed files with 16 additions and 2 deletions
  1. 2
    2
      net/net-snmp/Makefile
  2. 14
    0
      net/net-snmp/patches/900-musl-compat.patch

+ 2
- 2
net/net-snmp/Makefile View File

@@ -1,5 +1,5 @@
1 1
 #
2
-# Copyright (C) 2006-2014 OpenWrt.org
2
+# Copyright (C) 2006-2015 OpenWrt.org
3 3
 #
4 4
 # This is free software, licensed under the GNU General Public License v2.
5 5
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=net-snmp
11 11
 PKG_VERSION:=5.4.4
12
-PKG_RELEASE:=1
12
+PKG_RELEASE:=2
13 13
 
14 14
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 15
 PKG_SOURCE_URL:=@SF/net-snmp

+ 14
- 0
net/net-snmp/patches/900-musl-compat.patch View File

@@ -0,0 +1,14 @@
1
+--- a/agent/mibgroup/iwlib.h
2
++++ b/agent/mibgroup/iwlib.h
3
+@@ -85,6 +85,11 @@
4
+       && LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0)
5
+ #define LIBC5_HEADERS
6
+ 
7
++/* Musl */
8
++#elif !defined(__GLIBC__) && !defined(__UCLIBC__) \
9
++      && LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0)
10
++#define GENERIC_HEADERS
11
++
12
+ /* Unsupported combination */
13
+ #else
14
+ #error "Your kernel/libc combination is not supported"