tcf-agent: Implement canonicalize_file_name() for musl as well

(From OE-Core rev: 6faa7294ebc4f9897e256cad4b6e16fb56faaab9)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Khem Raj 2016-01-08 09:02:48 +00:00 committed by Richard Purdie
parent f294813dfe
commit c2c92026e4
2 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,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

View File

@ -12,6 +12,7 @@ UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
SRC_URI = "git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git;branch=1.3_mars_bugfix \
file://fix_ranlib.patch \
file://ldflags.patch \
file://0001-canonicalize_file_name-is-specific-to-glibc.patch;striplevel=2 \
file://tcf-agent.init \
file://tcf-agent.service \
"