mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
netlink: add nla_get_s32()
This function was added into libnl3 recently, but we have to support old versions of this library. Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
@@ -11,6 +11,8 @@ extern int do_rtnl_req(int nl, void *req, int size,
|
||||
extern int addattr_l(struct nlmsghdr *n, int maxlen, int type,
|
||||
const void *data, int alen);
|
||||
|
||||
extern int32_t nla_get_s32(const struct nlattr *nla);
|
||||
|
||||
#define NLMSG_TAIL(nmsg) \
|
||||
((struct rtattr *) (((void *) (nmsg)) + NLMSG_ALIGN((nmsg)->nlmsg_len)))
|
||||
|
||||
|
@@ -219,3 +219,8 @@ int __wrap_nlmsg_parse(struct nlmsghdr *nlh, int hdrlen, struct nlattr *tb[],
|
||||
return nla_parse(tb, maxtype, nlmsg_attrdata(nlh, hdrlen),
|
||||
nlmsg_attrlen(nlh, hdrlen), policy);
|
||||
}
|
||||
|
||||
int32_t nla_get_s32(const struct nlattr *nla)
|
||||
{
|
||||
return *(const int32_t *) nla_data(nla);
|
||||
}
|
||||
|
Reference in New Issue
Block a user