The rusage struct makes use of the timeval structure. Make sure to include sys/time.h so that the type is known. Add SIZE_MAX to stdint.h sys/resource expects the defined structures to not be defined with a typedef.
Add the basics of sys/resource.h so that work can begin on sys/wait.h