summaryrefslogtreecommitdiff
path: root/src/main/extractor_plugpath.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/extractor_plugpath.c')
-rw-r--r--src/main/extractor_plugpath.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/main/extractor_plugpath.c b/src/main/extractor_plugpath.c
index 4374bc5..269061f 100644
--- a/src/main/extractor_plugpath.c
+++ b/src/main/extractor_plugpath.c
@@ -24,7 +24,6 @@
*/
#include "platform.h"
-#include "plibc.h"
#include "extractor.h"
#include <dirent.h>
#include <sys/types.h>
@@ -103,7 +102,7 @@ get_path_from_proc_exe ()
sizeof (fn),
"/proc/%u/maps",
getpid ());
- if (NULL != (f = FOPEN (fn, "r")))
+ if (NULL != (f = fopen (fn, "r")))
{
while (NULL != fgets (line, 1024, f))
{
@@ -419,7 +418,7 @@ append_to_dir (const char *path,
if (0 == (slen = strlen (path)))
return NULL;
- if (DIR_SEPARATOR == fname[0])
+ if ('/' == fname[0])
fname++;
ret = malloc (slen + strlen (fname) + 2);
if (NULL == ret)
@@ -476,9 +475,9 @@ get_installation_paths (EXTRACTOR_PathProcessor pp,
LOG_STRERROR ("strdup");
return;
}
- for (prefix = strtok_r (d, PATH_SEPARATOR_STR, &saveptr);
+ for (prefix = strtok_r (d, ":", &saveptr);
NULL != prefix;
- prefix = strtok_r (NULL, PATH_SEPARATOR_STR, &saveptr))
+ prefix = strtok_r (NULL, ":", &saveptr))
pp (pp_cls, prefix);
free (d);
return;
@@ -551,9 +550,9 @@ find_plugin_in_path (void *cls,
if (NULL != sc->path)
return;
- if (NULL == (dir = OPENDIR (path)))
+ if (NULL == (dir = opendir (path)))
return;
- while (NULL != (ent = READDIR (dir)))
+ while (NULL != (ent = readdir (dir)))
{
if ('.' == ent->d_name[0])
continue;
@@ -568,7 +567,7 @@ find_plugin_in_path (void *cls,
if (NULL == (sym = strdup (sym_name)))
{
LOG_STRERROR ("strdup");
- CLOSEDIR (dir);
+ closedir (dir);
return;
}
dot = strchr (sym, '.');
@@ -582,7 +581,7 @@ find_plugin_in_path (void *cls,
}
free (sym);
}
- CLOSEDIR (dir);
+ closedir (dir);
}