From b5183d5e3057a0f9c5afeb98a9b8d677cedd1a73 Mon Sep 17 00:00:00 2001 From: Peter Lieven Date: Sat, 3 Nov 2012 18:15:05 +0100 Subject: [PATCH] LD_ISCSI add pwrite and dlsym it at init --- src/ld_iscsi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ld_iscsi.c b/src/ld_iscsi.c index 7a740f2..f9271a6 100644 --- a/src/ld_iscsi.c +++ b/src/ld_iscsi.c @@ -653,6 +653,12 @@ static void __attribute__((constructor)) _init(void) exit(10); } + real_pwrite = dlsym(RTLD_NEXT, "pwrite"); + if (real_pwrite == NULL) { + LD_ISCSI_DPRINTF(0,"Failed to dlsym(pwrite)"); + exit(10); + } + real_dup2 = dlsym(RTLD_NEXT, "dup2"); if (real_dup2 == NULL) { LD_ISCSI_DPRINTF(0,"Failed to dlsym(dup2)");