summaryrefslogtreecommitdiffstats
path: root/poky/meta/recipes-devtools/tcf-agent/tcf-agent/0001-canonicalize_file_name-is-specific-to-glibc.patch
blob: 5f93c46f29f50c69365032c0c1d4d4b76df4eb12 (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
41
42
43
44
45
46
From 23a3759b74d081b3b2849b0d37a0e5219f37813e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 7 Jan 2016 22:37:48 +0000
Subject: [PATCH] canonicalize_file_name is specific to glibc

When on Linux and not using glibc then we need to define
canonicalize_file_name() API, therefore add a check for finding out if
its not glibc

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Pending

 agent/tcf/framework/mdep.c | 2 +-
 agent/tcf/framework/mdep.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/agent/tcf/framework/mdep.c b/agent/tcf/framework/mdep.c
index 2b52ca8..7d09655 100644
--- a/agent/tcf/framework/mdep.c
+++ b/agent/tcf/framework/mdep.c
@@ -1042,7 +1042,7 @@ char * canonicalize_file_name(const char * path) {
     return strdup(res);
 }
 
-#elif defined(__UCLIBC__)
+#elif defined(__UCLIBC__) || !defined(__GLIBC__)
 
 char * canonicalize_file_name(const char * path) {
     return realpath(path, NULL);
diff --git a/agent/tcf/framework/mdep.h b/agent/tcf/framework/mdep.h
index 1e718a2..187c399 100644
--- a/agent/tcf/framework/mdep.h
+++ b/agent/tcf/framework/mdep.h
@@ -276,7 +276,7 @@ extern int loc_clock_gettime(int, struct timespec *);
 
 #define O_BINARY 0
 
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) || !defined(__GLIBC__)
 #  define O_LARGEFILE 0
 extern char ** environ;
 extern char * canonicalize_file_name(const char * path);
-- 
2.7.0

OpenPOWER on IntegriCloud