summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomoki AONO <aono@cc.osaka-kyoiku.ac.jp>2007-11-25 01:59:40 +0900
committerVolker Lendecke <vl@sernet.de>2007-11-26 09:00:33 +0100
commit02571885a91c83c64cc894070f5c15bde81620b5 (patch)
tree9db1330dc95dc00eb6695eb3f1f063cbbc493bda
parentbff221cf1b52552fc556aa2c880a7e386b1cb2ac (diff)
downloadsamba-02571885a91c83c64cc894070f5c15bde81620b5.tar.gz
samba-02571885a91c83c64cc894070f5c15bde81620b5.tar.bz2
samba-02571885a91c83c64cc894070f5c15bde81620b5.zip
1. lib/system.c (xattr code for Solaris) could not be
built against c90 compilers. (declaration after statement.) Sample patch attached. (This used to be commit 102a247df99967f25dbaf40c9be2d48a8e15c64c)
-rw-r--r--source3/lib/system.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 7338ea7750..5013cc53e8 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -1990,9 +1990,10 @@ int sys_setxattr (const char *path, const char *name, const void *value, size_t
#elif defined(HAVE_ATTROPEN)
int ret = -1;
int myflags = O_RDWR;
+ int attrfd;
if (flags & XATTR_CREATE) myflags |= O_EXCL;
if (!(flags & XATTR_REPLACE)) myflags |= O_CREAT;
- int attrfd = solaris_attropen(path, name, myflags, (mode_t) SOLARIS_ATTRMODE);
+ attrfd = solaris_attropen(path, name, myflags, (mode_t) SOLARIS_ATTRMODE);
if (attrfd >= 0) {
ret = solaris_write_xattr(attrfd, value, size);
close(attrfd);
@@ -2053,9 +2054,10 @@ int sys_lsetxattr (const char *path, const char *name, const void *value, size_t
#elif defined(HAVE_ATTROPEN)
int ret = -1;
int myflags = O_RDWR | AT_SYMLINK_NOFOLLOW;
+ int attrfd;
if (flags & XATTR_CREATE) myflags |= O_EXCL;
if (!(flags & XATTR_REPLACE)) myflags |= O_CREAT;
- int attrfd = solaris_attropen(path, name, myflags, (mode_t) SOLARIS_ATTRMODE);
+ attrfd = solaris_attropen(path, name, myflags, (mode_t) SOLARIS_ATTRMODE);
if (attrfd >= 0) {
ret = solaris_write_xattr(attrfd, value, size);
close(attrfd);
@@ -2117,9 +2119,10 @@ int sys_fsetxattr (int filedes, const char *name, const void *value, size_t size
#elif defined(HAVE_ATTROPEN)
int ret = -1;
int myflags = O_RDWR | O_XATTR;
+ int attrfd;
if (flags & XATTR_CREATE) myflags |= O_EXCL;
if (!(flags & XATTR_REPLACE)) myflags |= O_CREAT;
- int attrfd = solaris_openat(filedes, name, myflags, (mode_t) SOLARIS_ATTRMODE);
+ attrfd = solaris_openat(filedes, name, myflags, (mode_t) SOLARIS_ATTRMODE);
if (attrfd >= 0) {
ret = solaris_write_xattr(attrfd, value, size);
close(attrfd);