Make error: PATH_MAX (not in a function)

I recently ran onto an error while compiling a development on a SLES11 box, the error that came up was the following:

error: âPATH_MAXâ undeclared here (not in a function)

The error can be solved by adding the following line after the #include ‹string.h› line to the sourcecode of the .c file which generates the error during compilation:
#include ‹limits.h›

Recompile your sourcecode again, it should be fine now!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.