diff --git a/Makefile b/Makefile index 398ccd1..23f1bcb 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ all: tardis novdso.so tardis: tardis.c - gcc tardis.c -o tardis -lm -Wall -Ofast -std=c99 + gcc tardis.c -o tardis -lm -Wall -Ofast -std=c99 -DPID_MAX=$(shell cat /proc/sys/kernel/pid_max) novdso.so: novdso.c gcc -std=c99 -Wall -fPIC -shared -o novdso.so novdso.c diff --git a/tardis.c b/tardis.c index acaae74..1529495 100644 --- a/tardis.c +++ b/tardis.c @@ -17,7 +17,9 @@ #define MICROSECONDS 1000000 #define NANOSECONDS (MICROSECONDS*1000) #define NUM_SYSCALLS 512 // this is higher than the real number, but shouldn't matter +#ifndef PID_MAX #define PID_MAX 32768 // XXX: assumption +#endif #define NUM_CLKIDS 16 // XXX: incorrect, but "works" anyway double starttimes[NUM_CLKIDS], delayfactor, timefactor;