diff --git a/darkhttpd.c b/darkhttpd.c index 3dde728..388739a 100644 --- a/darkhttpd.c +++ b/darkhttpd.c @@ -2581,7 +2581,7 @@ static void pidfile_create(void) { err(1, "ftruncate() failed"); } - snprintf(pidstr, sizeof(pidstr), "%u", getpid()); + snprintf(pidstr, sizeof(pidstr), "%d", (int)getpid()); if (pwrite(fd, pidstr, strlen(pidstr), 0) != (ssize_t)strlen(pidstr)) { error = errno; pidfile_remove();