aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/efivar/efivar/musl-strndupa.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-extended/efivar/efivar/musl-strndupa.patch')
-rw-r--r--meta-oe/recipes-extended/efivar/efivar/musl-strndupa.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/efivar/efivar/musl-strndupa.patch b/meta-oe/recipes-extended/efivar/efivar/musl-strndupa.patch
new file mode 100644
index 0000000000..fc8f8c8b21
--- /dev/null
+++ b/meta-oe/recipes-extended/efivar/efivar/musl-strndupa.patch
@@ -0,0 +1,17 @@
+Taken from void linux
+
+Index: git/src/linux.c
+===================================================================
+--- git.orig/src/linux.c
++++ git/src/linux.c
+@@ -40,6 +40,10 @@
+ #include <efivar.h>
+ #include <efiboot.h>
+
++#if !defined(__GLIBC__)
++#define strndupa(x,s) strncpy(alloca(strlen(x)+1),x,s)
++#endif
++
+ #include "dp.h"
+ #include "linux.h"
+ #include "util.h"