Update main.c

FIX: Add include for wait call.

* No regressions.
* Make the user able to compile with -Werror flag.