summaryrefslogtreecommitdiff
path: root/user/efivar/musl-strndupa.patch
diff options
context:
space:
mode:
Diffstat (limited to 'user/efivar/musl-strndupa.patch')
-rw-r--r--user/efivar/musl-strndupa.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/user/efivar/musl-strndupa.patch b/user/efivar/musl-strndupa.patch
new file mode 100644
index 000000000..fc32d9740
--- /dev/null
+++ b/user/efivar/musl-strndupa.patch
@@ -0,0 +1,13 @@
+--- efivar-31/src/linux.c 2017-02-13 17:52:14.000000000 +0100
++++ efivar-31/src/linux.c 2017-02-18 04:42:13.893911649 +0100
+@@ -44,6 +44,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"