#include <stdlib.h>

See if this changes the problem