summaryrefslogtreecommitdiff
path: root/dln.c
diff options
context:
space:
mode:
Diffstat (limited to 'dln.c')
-rw-r--r--dln.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dln.c b/dln.c
index 219a22d..c19c421 100644
--- a/dln.c
+++ b/dln.c
@@ -348,14 +348,14 @@ sym_hash(struct exec *hdrp, struct nlist *syms)
static int
dln_init(const char *prog)
{
- char *file;
+ char *file, fbuf[MAXPATHLEN];
int fd;
struct exec hdr;
struct nlist *syms;
if (dln_init_p == 1) return 0;
- file = dln_find_exe(prog, NULL);
+ file = dln_find_exe_r(prog, NULL, fbuf, sizeof(fbuf));
if (file == NULL || (fd = open(file, O_RDONLY)) < 0) {
dln_errno = errno;
return -1;