2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-12-21 06:40:16 -07:00

libnl-tiny: add defs for wpa_supplicant

This commit is contained in:
Owen Rafferty 2024-07-21 17:17:23 -05:00
parent 8dc26353b0
commit 8d2890e71a
No known key found for this signature in database
5 changed files with 35 additions and 1 deletions

View File

@ -1,3 +1,5 @@
#!/bin/sh -e
patch -p1 < nla_s8.patch
make ALL_LIBS=libnl-tiny.a DESTDIR="$1" prefix=/usr install

View File

@ -1 +1,2 @@
d08d8c719d98d3ee9682173f0de0e3768abe024b95c60729b0c7385224a1e840d4
0feaf6f2d721c5878b62b36c64de485322dbc9a0783e1d9d8b744c616bc3080650

View File

@ -0,0 +1,30 @@
diff --git a/include/netlink/attr.h b/include/netlink/attr.h
index 3e3047f..789e8c2 100644
--- a/include/netlink/attr.h
+++ b/include/netlink/attr.h
@@ -45,6 +45,7 @@ enum {
NLA_FLAG, /**< Flag */
NLA_MSECS, /**< Micro seconds (64bit) */
NLA_NESTED, /**< Nested attributes */
+ NLA_S8,
__NLA_TYPE_MAX,
};
@@ -248,6 +249,17 @@ static inline int nla_put_addr(struct nl_msg *msg, int attrtype, struct nl_addr
* @name Integer Attributes
*/
+/**
+ * Return value of 8 bit signed integer attribute.
+ * @arg nla 8 bit integer attribute
+ *
+ * @return Payload as 8 bit integer
+ */
+static inline int8_t nla_get_s8(const struct nlattr *nla)
+{
+ return *(const int8_t *) nla_data(nla);
+}
+
/**
* Add 8 bit integer attribute to netlink message.
* @arg msg Netlink message.

View File

@ -1 +1,2 @@
https://github.com/sabotage-linux/libnl-tiny/archive/39ec78bb012edc2739c3d3d0058e4076411068b1.tar.gz
patches/nla_s8.patch

View File

@ -1 +1 @@
28c44ca97cd546ef8168e7476472a0da022b3421 1
39ec78bb012edc2739c3d3d0058e4076411068b1 1