diff --git a/src/ChangeLog b/src/ChangeLog index 732a2da4..8db97f32 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-01-09 Jeremy Olexa <darkside@gentoo.org> (tiny change) + + * init.c: Deal with systems which provide PATH_MAX in + sys/param.h rather than limits.h. + 2009-10-09 Steven Schweda <sms@antinode.info> * utils.c: Added characters " : \ | to the list of normal diff --git a/src/init.c b/src/init.c index 5a05d035..49c6ea3d 100644 --- a/src/init.c +++ b/src/init.c @@ -37,6 +37,15 @@ as that of the covered work. */ #endif #include <string.h> #include <errno.h> +#include <limits.h> +/* not all systems provide PATH_MAX in limits.h */ +#ifndef PATH_MAX +# include <sys/param.h> +# ifndef PATH_MAX +# define PATH_MAX MAXPATHLEN +# endif +#endif + #ifdef HAVE_PWD_H # include <pwd.h>