Update main.c

FIX: Add include for wait call.

* No regressions.
* Make the user able to compile with -Werror flag.
Merge pull request #7 from soyel/patch-1

Update main.c