diff --git a/src/fish_test_helper.cpp b/src/fish_test_helper.cpp index b434d93a1..9ba502dc9 100644 --- a/src/fish_test_helper.cpp +++ b/src/fish_test_helper.cpp @@ -48,12 +48,13 @@ static void print_stdout_stderr() { } static void print_pid_then_sleep() { - fprintf(stdout, "%d\n", getpid()); + // On some systems getpid is a long, on others it's an int, let's just cast it. + fprintf(stdout, "%ld\n", (long)getpid()); fflush(nullptr); usleep(1000000 / 2); //.5 secs } -static void print_pgrp() { fprintf(stdout, "%d\n", getpgrp()); } +static void print_pgrp() { fprintf(stdout, "%ld\n", (long)getpgrp()); } static void print_fds() { bool needs_space = false;