diff --git a/src/dedicated.cpp b/src/dedicated.cpp index fe3cd7cfb8..92cead038c 100644 --- a/src/dedicated.cpp +++ b/src/dedicated.cpp @@ -9,6 +9,7 @@ #include "stdafx.h" #include "fileio_func.h" +#include "debug.h" #include std::string _log_file; ///< File to reroute output of a forked OpenTTD to @@ -20,15 +21,6 @@ std::unique_ptr _log_fd; ///< File to reroute output of a for #include "safeguards.h" -#if defined(SUNOS) && !defined(_LP64) && !defined(_I32LPx) -/* Solaris has, in certain situation, pid_t defined as long, while in other - * cases it has it defined as int... this handles all cases nicely. - */ -# define PRINTF_PID_T "%ld" -#else -# define PRINTF_PID_T "%d" -#endif - void DedicatedFork() { /* Fork the program */ @@ -59,8 +51,8 @@ void DedicatedFork() default: /* We're the parent */ - printf("Loading dedicated server...\n"); - printf(" - Forked to background with pid " PRINTF_PID_T "\n", pid); + Debug(net, 0, "Loading dedicated server..."); + Debug(net, 0, " - Forked to background with pid {}", pid); exit(0); } }