bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Build failure with cd -@ / O_XATTR


From: Lionel Cons
Subject: Build failure with cd -@ / O_XATTR
Date: Tue, 5 Nov 2013 23:04:18 +0100

On systems with O_XATTR the bash git devel branch fails due a misnamed
buffer used for cd -@ support:

gcc -c  -DHAVE_CONFIG_H -DSHELL  -I. -I..  -I.. -I../include -I../lib
-I.  -DSOLARIS -DDEBUG  -g -O2 cd.c || ( rm -f cd.c ; exit 1 )
./cd.def: In function `cdxattr':
./cd.def:219: error: `buff' undeclared (first use in this function)
./cd.def:219: error: (Each undeclared identifier is reported only once
./cd.def:219: error: for each function it appears in.)
gmake[1]: *** [cd.o] Error 1

The fix is straightforward:
diff --git a/builtins/cd.def b/builtins/cd.def
index 498cf88..c448c5a 100644
--- a/builtins/cd.def
+++ b/builtins/cd.def
@@ -194,7 +194,7 @@ cdxattr (dir, ndirp)
 {
 #if defined (O_XATTR)
   int apfd, fd, r, e;
-  char buf[11+40+40];  /* construct new `fake' path for pwd */
+  char buff[11+40+40]; /* construct new `fake' path for pwd */

   apfd = openat (AT_FDCWD, dir, O_RDONLY|O_NONBLOCK);
   if (apfd < 0)


And thanks for cd -@ - keep up the good work :)

Lionel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]