[hackers] [sbase] pathconf(".", _PC_PATH_MAX) doesn't work from nfs mounted filesystems on BSD systems, use "/" instead. || Federico G. Benavento

From: <git_AT_suckless.org>
Date: Sun, 10 Mar 2013 21:50:13 +0100

commit ae3423e366405085e0146d5d3f1a717c402fd929
Author: Federico G. Benavento <benavento_AT_gmail.com>
Date: Sun Mar 10 17:48:17 2013 -0300

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

diff --git a/util/apathmax.c b/util/apathmax.c
index 4e1b71e..5dc831f 100644
--- a/util/apathmax.c
+++ b/util/apathmax.c
_AT_@ -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 {
Received on Sun Mar 10 2013 - 21:50:13 CET

This archive was generated by hypermail 2.3.0 : Sun Mar 10 2013 - 22:00:13 CET