Looks like it was sys/resource.h needed to be included.