Use dup2() replacement from libreplace.
[kai/samba.git] / source3 / lib / debug.c
index be2707b59505a927c34dbf771b9fa255959dff43..986dff48d7d2ca31b004fcce8caa125a23cd6be5 100644 (file)
@@ -680,8 +680,8 @@ bool reopen_logs( void )
        force_check_log_size();
        (void)umask(oldumask);
 
-       /* Take over stderr to catch ouput into logs */
-       if (dbf && sys_dup2(x_fileno(dbf), 2) == -1) {
+       /* Take over stderr to catch output into logs */
+       if (dbf && dup2(x_fileno(dbf), 2) == -1) {
                close_low_fds(True); /* Close stderr too, if dup2 can't point it
                                        at the logfile */
        }