2757N/APatch needed for xattr to build properly on Solaris, with Studio compilers.
2757N/Aindex 0466d30..390c333 100644
2757N/A-#elif defined(__SUN__) || defined(__sun__) || defined(sun)
2757N/A+#elif defined(__SUN__) || defined(__sun__) || defined(__sun)
2757N/A@@ -59,7 +60,7 @@ static void convert_bsd_list(char *namebuf, size_t size)
2757N/A int length = (int) namebuf[offset];
2757N/A memmove(namebuf+offset, namebuf+offset+1, length);
2757N/A- namebuf[offset+length] = '\0';
2757N/A+ namebuf[offset+length] = '\\0';
2757N/A@@ -260,7 +261,7 @@ static ssize_t xattr_flistxattr(int fd, char *namebuf, size_t size, int options)
2757N/A-#elif defined(__SUN__) || defined(__sun__) || defined(sun)
2757N/A+#elif defined(__SUN__) || defined(__sun__) || defined(__sun)
2757N/A /* Solaris 9 and later compatibility API */
2757N/A #define XATTR_XATTR_NOFOLLOW 0x0001
2757N/A@@ -268,6 +269,9 @@ static ssize_t xattr_flistxattr(int fd, char *namebuf, size_t size, int options)
2757N/A #define XATTR_XATTR_REPLACE 0x0004
2757N/A #define XATTR_XATTR_NOSECURITY 0x0008
2757N/A@@ -429,7 +433,7 @@ static ssize_t xattr_xflistxattr(int xfd, char *namebuf, size_t size, int option
2757N/A snprintf((char *)(namebuf + nsize), esize + 1,
2757N/A- nsize += esize + 1; /* +1 for \0 */
2757N/A+ nsize += esize + 1; /* +1 for \\0 */
2757N/A@@ -438,7 +442,7 @@ static ssize_t xattr_flistxattr(int fd, char *namebuf, size_t size, int options)
2757N/A- xfd = openat(fd, ".", O_RDONLY);
2757N/A+ xfd = openat(fd, ".", O_RDONLY | O_XATTR);
2757N/A return xattr_xflistxattr(xfd, namebuf, size, options);
2757N/A@@ -716,7 +720,7 @@ def _flistxattr(fd, options=0):
2757N/A flistxattr(fd, options=0) -> str