--- a/lib/test_process.c +++ b/lib/test_process.c @@ -21,7 +21,9 @@ #include #include #include +#ifdef __linux__ #include +#endif #include "c.h" #define DEFAULT_SLEEPTIME 300 @@ -78,8 +80,10 @@ sigaction(SIGUSR1, &signal_action, NULL); sigaction(SIGUSR2, &signal_action, NULL); +#ifdef __linux__ /* set process name */ prctl(PR_SET_NAME, MY_NAME, NULL, NULL, NULL); +#endif while (sleep_time > 0) { sleep_time = sleep(sleep_time);