Add missing stdlib.h includes to sim