pathconf(".", _PC_PATH_MAX) doesn't work from nfs mounted filesystems on BSD systems, use "/" instead.

This commit is contained in:
Federico G. Benavento 2013-03-10 17:48:17 -03:00
parent f8dc6883a3
commit ae3423e366

View File

@ -11,7 +11,7 @@ apathmax(char **p, long *size)
{
errno = 0;
if((*size = pathconf(".", _PC_PATH_MAX)) == -1) {
if((*size = pathconf("/", _PC_PATH_MAX)) == -1) {
if(errno == 0) {
*size = BUFSIZ;
} else {