summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-2.0.2/0001-libmissing.h-fix-klibc-build-when-using-glibc-toolch.patch
blob: 4ee9bd9a18c6d6e398923b8cdfff0883e5ec4fb7 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From e596ae99059c28fa9bb3461e03e7ecaacbf41727 Mon Sep 17 00:00:00 2001
From: Andrea Adami <andrea.adami@gmail.com>
Date: Wed, 23 May 2018 15:34:59 +0200
Subject: [PATCH] libmissing.h: fix klibc build when using glibc toolchain

klibc lacks execinfo.h so adda guard around it.
Note: build with musl toolchain is ok even without this patch.

Fix build error:

| In file included from ../git/lib/execinfo.c:1:0:
| ../git/include/libmissing.h:7:10: fatal error: execinfo.h: 
 No such file or directory

Upstream-Status: Inappropriate [klibc specific]

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
---
 include/libmissing.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/libmissing.h b/include/libmissing.h
index 0196033..832c372 100644
--- a/include/libmissing.h
+++ b/include/libmissing.h
@@ -3,9 +3,11 @@
 
 #include "config.h"
 
+#ifndef __KLIBC__
 #ifdef HAVE_EXECINFO_H
 #include <execinfo.h>
 #endif
+#endif
 
 #ifndef HAVE_EXECINFO_H
 int backtrace(void **buffer, int size);
-- 
2.7.4

OpenPOWER on IntegriCloud