summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/debug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/debug.c b/source3/lib/debug.c
index f4f3ee2f9f..483db71b85 100644
--- a/source3/lib/debug.c
+++ b/source3/lib/debug.c
@@ -603,7 +603,7 @@ BOOL reopen_logs( void )
(void)umask(oldumask);
/* Take over stderr to catch ouput into logs */
- if (dbf && sys_dup2(dbf->fd, 2) == -1) {
+ if (dbf && sys_dup2(x_fileno(dbf), 2) == -1) {
close_low_fds(True); /* Close stderr too, if dup2 can't point it
at the logfile */
}