diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-03-21 15:54:48 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-03-21 15:54:48 +0000 |
commit | 4621a855b2e35f14ee3310052fffe100203c301d (patch) | |
tree | c8e3e24ac1f85557ab5184d73b7a51669434efa7 /package/libs/libnl-tiny | |
parent | 19f9b22f09497e13457a6f45cbdff6ef6bdb1548 (diff) | |
download | upstream-4621a855b2e35f14ee3310052fffe100203c301d.tar.gz upstream-4621a855b2e35f14ee3310052fffe100203c301d.tar.bz2 upstream-4621a855b2e35f14ee3310052fffe100203c301d.zip |
libnl-tiny: ensure compatibility to libnl version 3 and higher
To be prepared to support keepalived 1.2.10 and higher we need libnl3 or
higher. The attached patch
add some defines so that it can be build be libnl-tiny.
Patch by Thomas Heil
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 39991
Diffstat (limited to 'package/libs/libnl-tiny')
-rw-r--r-- | package/libs/libnl-tiny/src/error.c | 8 | ||||
-rw-r--r-- | package/libs/libnl-tiny/src/include/netlink/errno.h | 7 |
2 files changed, 14 insertions, 1 deletions
diff --git a/package/libs/libnl-tiny/src/error.c b/package/libs/libnl-tiny/src/error.c index 71ae7220e8..e8ee47459e 100644 --- a/package/libs/libnl-tiny/src/error.c +++ b/package/libs/libnl-tiny/src/error.c @@ -42,6 +42,11 @@ static const char *errmsg[NLE_MAX+1] = { [NLE_PROTO_MISMATCH] = "Protocol mismatch", [NLE_NOACCESS] = "No Access", [NLE_PERM] = "Operation not permitted", +[NLE_PKTLOC_FILE] = "Unable to open packet location file", +[NLE_PARSE_ERR] = "Unable to parse object", +[NLE_NODEV] = "No such device", +[NLE_IMMUTABLE] = "Immutable attribute", +[NLE_DUMP_INTR] = "Dump inconsistency detected, interrupted", }; /** @@ -85,6 +90,7 @@ int nl_syserr2nlerr(int error) case EADDRINUSE: return NLE_EXIST; case EEXIST: return NLE_EXIST; case EADDRNOTAVAIL: return NLE_NOADDR; + case ESRCH: /* fall through */ case ENOENT: return NLE_OBJ_NOTFOUND; case EINTR: return NLE_INTR; case EAGAIN: return NLE_AGAIN; @@ -100,6 +106,8 @@ int nl_syserr2nlerr(int error) case EOPNOTSUPP: return NLE_OPNOTSUPP; case EPERM: return NLE_PERM; case EBUSY: return NLE_BUSY; + case ERANGE: return NLE_RANGE; + case ENODEV: return NLE_NODEV; default: return NLE_FAILURE; } } diff --git a/package/libs/libnl-tiny/src/include/netlink/errno.h b/package/libs/libnl-tiny/src/include/netlink/errno.h index 0b43da02a9..f8b5130c22 100644 --- a/package/libs/libnl-tiny/src/include/netlink/errno.h +++ b/package/libs/libnl-tiny/src/include/netlink/errno.h @@ -45,8 +45,13 @@ extern "C" { #define NLE_PROTO_MISMATCH 26 #define NLE_NOACCESS 27 #define NLE_PERM 28 +#define NLE_PKTLOC_FILE 29 +#define NLE_PARSE_ERR 30 +#define NLE_NODEV 31 +#define NLE_IMMUTABLE 32 +#define NLE_DUMP_INTR 33 -#define NLE_MAX NLE_PERM +#define NLE_MAX NLE_DUMP_INTR extern const char * nl_geterror(int); extern void nl_perror(int, const char *); |