From 6e995a0582c762367fdfccd97ccde229c1db06e6 Mon Sep 17 00:00:00 2001 From: jdp Date: Sat, 22 Jan 2000 22:20:05 +0000 Subject: Allow files in LD_PRELOAD to be separated by white space, like Solaris and Linux. --- libexec/rtld-elf/rtld.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libexec/rtld-elf') diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index b5bba08..652d0c8 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -1034,13 +1034,14 @@ static int load_preload_objects(void) { char *p = ld_preload; + static const char delim[] = " \t:;"; if (p == NULL) return NULL; - p += strspn(p, ":;"); + p += strspn(p, delim); while (*p != '\0') { - size_t len = strcspn(p, ":;"); + size_t len = strcspn(p, delim); char *path; char savech; @@ -1052,7 +1053,7 @@ load_preload_objects(void) return -1; /* XXX - cleanup */ p[len] = savech; p += len; - p += strspn(p, ":;"); + p += strspn(p, delim); } return 0; } -- cgit v1.1