summaryrefslogtreecommitdiffstats
path: root/libdw/dwarf_getalt.c
diff options
context:
space:
mode:
authorUlf Hermann <[email protected]>2018-07-20 15:52:28 +0200
committerUlf Hermann <[email protected]>2018-07-23 11:38:30 +0000
commitbc067a19e0f237487abef8728093cfbd1787d6d8 (patch)
treecb3bc583191b706e245602bde5cc5b7cd6198ba7 /libdw/dwarf_getalt.c
parentf57fd0ba726d759b177665921392962672a8f026 (diff)
Make __libdw_debugdir and __libdw_filepath portable
Use generic IS_ABSOLUTE_FILE macro, and implement fd-to-filename for windows. Reading from /proc/self obviously is not porable. Change-Id: I805c5295871c13f4fa4b89eb89871fc100559318 Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'libdw/dwarf_getalt.c')
-rw-r--r--libdw/dwarf_getalt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libdw/dwarf_getalt.c b/libdw/dwarf_getalt.c
index 05624d5d..696ce461 100644
--- a/libdw/dwarf_getalt.c
+++ b/libdw/dwarf_getalt.c
@@ -52,10 +52,10 @@ __libdw_filepath (const char *debugdir, const char *dir, const char *file)
if (file == NULL)
return NULL;
- if (file[0] == '/')
+ if (IS_ABSOLUTE_PATH(file))
return strdup (file);
- if (dir != NULL && dir[0] == '/')
+ if (dir != NULL && IS_ABSOLUTE_PATH(dir))
{
size_t dirlen = strlen (dir);
size_t filelen = strlen (file);