summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-oe/recipes-bsp/efivar/efivar/musl-strndupa.patch
blob: 5864ac63e40e6fd616721b42c3e07007a2538414 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From 8000b9afc858472912aace985004b44f8eb467e0 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 18 Aug 2017 09:49:49 -0700
Subject: [PATCH] support musl

Upstream-Status: Pending
---
 src/linux.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/linux.c b/src/linux.c
index 34ed479..1304f2b 100644
--- a/src/linux.c
+++ b/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"
OpenPOWER on IntegriCloud