diff --git a/examples/app.c b/examples/app.c index e3bfb1e1..acf64443 100644 --- a/examples/app.c +++ b/examples/app.c @@ -7,7 +7,10 @@ #define _GNU_SOURCE -#include +#ifdef __linux__ +# include +#endif + #include #include #include @@ -68,7 +71,11 @@ do_some_work (SysprofCaptureWriter *writer) sysprof_capture_writer_add_mark (writer, begin_time_nsec, /* Begin time in nsec */ +#ifdef __linux__ sched_getcpu (), /* -1 to ignore */ +#else + -1, +#endif getpid (), /* -1 to ignore */ real_duration, /* duration in nsec */ "Example", /* Group name, 23 chars+\0 */