diff options
author | Tomoki AONO <aono@cc.osaka-kyoiku.ac.jp> | 2007-11-25 01:59:40 +0900 |
---|---|---|
committer | Volker Lendecke <vl@sernet.de> | 2007-11-26 09:00:33 +0100 |
commit | 102a247df99967f25dbaf40c9be2d48a8e15c64c (patch) | |
tree | b61289d32df0b78b9d61752790a4b527d1c85b99 /source | |
parent | 41e07682dc1fa535ddaf405efa26fabb33c8bbf9 (diff) | |
download | samba-102a247df99967f25dbaf40c9be2d48a8e15c64c.tar.gz samba-102a247df99967f25dbaf40c9be2d48a8e15c64c.tar.xz samba-102a247df99967f25dbaf40c9be2d48a8e15c64c.zip |
1. lib/system.c (xattr code for Solaris) could not be
built against c90 compilers. (declaration after
statement.) Sample patch attached.
Diffstat (limited to 'source')
-rw-r--r-- | source/lib/system.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/lib/system.c b/source/lib/system.c index 7338ea7750d..5013cc53e83 100644 --- a/source/lib/system.c +++ b/source/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); |