ASR_BASE
Change-Id: Icf3719cc0afe3eeb3edc7fa80a2eb5199ca9dda1
diff --git a/package/libs/keyutils/patches/010-reproducible-build.patch b/package/libs/keyutils/patches/010-reproducible-build.patch
new file mode 100644
index 0000000..0507f91
--- /dev/null
+++ b/package/libs/keyutils/patches/010-reproducible-build.patch
@@ -0,0 +1,11 @@
+--- a/Makefile
++++ b/Makefile
+@@ -109,7 +109,7 @@ all: keyctl request-key key.dns_resolver
+ ###############################################################################
+ #RPATH = -Wl,-rpath,$(LIBDIR)
+
+-VCPPFLAGS := -DPKGBUILD="\"$(shell date -u +%F)\""
++VCPPFLAGS := -DPKGBUILD="\"for OpenWrt"\"
+ VCPPFLAGS += -DPKGVERSION="\"keyutils-$(VERSION)\""
+ VCPPFLAGS += -DAPIVERSION="\"libkeyutils-$(APIVERSION)\""
+
diff --git a/package/libs/keyutils/patches/020-rindex.patch b/package/libs/keyutils/patches/020-rindex.patch
new file mode 100644
index 0000000..5137518
--- /dev/null
+++ b/package/libs/keyutils/patches/020-rindex.patch
@@ -0,0 +1,17 @@
+--- a/key.dns_resolver.c
++++ b/key.dns_resolver.c
+@@ -717,12 +717,12 @@ int main(int argc, char *argv[])
+ keyend = buf + ktlen + 1;
+
+ /* the actual key description follows the last semicolon */
+- keyend = rindex(keyend, ';');
++ keyend = strrchr(keyend, ';');
+ if (!keyend)
+ error("Invalid key description: %s", buf);
+ keyend++;
+
+- name = index(keyend, ':');
++ name = strchr(keyend, ':');
+ if (!name)
+ dns_query_a_or_aaaa(keyend, callout_info);
+