I keep getting
implicit declaration of function \'execle\' is invalid in C99
when compiling the code below. What am I missing?
In C99, the implicit declaration of a function is not allowed. That means, the compiler should be aware of the function signature before it encounters a call to that function. This can be achieved two ways:
Usually, the function signature is provided as a forward declaration through the header files.
As per the man page of execle(), you need to include unistd.h to get the forward declaration.