On Tue, 2012-10-30 at 16:51 -0200, Luiz Gustavo dos S. Costa wrote: > Hi list, > > I tried run the configure script of the samba4 version rc4 in a > freebsd 9.1-RC2 without successful. > > i put the output of configure in a binpaste url: > > http://zlin.dk/p/?ZmE5MjA0 > > root@samba4:/samba/devel/samba-4.0.0rc4 # uname -a > FreeBSD samba4.ad.mundounix.com.br 9.1-RC2 FreeBSD 9.1-RC2 #0 r241106: > Mon Oct 1 18:26:44 UTC 2012 > [email protected]:/usr/obj/usr/src/sys/GENERIC amd64
Sadly I didn't get my build fixes into the RC branch before rc4. The attached should help, along with the fix for xattr support. At this point master and v4-0-test have diverged, which is why there are these differences. Andrew Bartlett -- Andrew Bartlett http://samba.org/~abartlet/ Authentication Developer, Samba Team http://samba.org
>From b5aed614bfe6da2c4034773291ad619e610f1115 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett <[email protected]> Date: Tue, 23 Oct 2012 17:31:03 +1100 Subject: [PATCH 37/39] lib/replace: Fix configure on FreeBSD: define_ret is not correct here define_ret is for when the output of the compiled and run program should be put into the configure define. This is not the case here. Andrew Bartlett --- lib/replace/wscript | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/replace/wscript b/lib/replace/wscript index 2e1dd65..5249e40 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -217,7 +217,6 @@ def configure(conf): msg="Checking correct behavior of strtoll", headers = 'errno.h', execute = True, - define_ret = True, define = 'HAVE_BSD_STRTOLL', ) conf.CHECK_FUNCS('if_nametoindex strerror_r') -- 1.7.11.7
>From 2756c3ce5c7d5d066dc76592dd1078a8594b983b Mon Sep 17 00:00:00 2001 From: Andrew Bartlett <[email protected]> Date: Sat, 27 Oct 2012 19:15:58 +1100 Subject: [PATCH] lib/replace: Return size of xattr if size argument is 0 This makes rep_{f,}getxattr a more complete replacement for the linux function. Andrew Bartlett --- lib/replace/xattr.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/replace/xattr.c b/lib/replace/xattr.c index 8e1c989..a26ff67 100644 --- a/lib/replace/xattr.c +++ b/lib/replace/xattr.c @@ -71,7 +71,9 @@ ssize_t rep_getxattr (const char *path, const char *name, void *value, size_t si * that the buffer is large enough to fit the returned value. */ if((retval=extattr_get_file(path, attrnamespace, attrname, NULL, 0)) >= 0) { - if(retval > size) { + if (size == 0) { + return retval; + } else if (retval > size) { errno = ERANGE; return -1; } @@ -88,6 +90,9 @@ ssize_t rep_getxattr (const char *path, const char *name, void *value, size_t si if (strncmp(name, "system", 6) == 0) flags |= ATTR_ROOT; retval = attr_get(path, attrname, (char *)value, &valuelength, flags); + if (size == 0 && retval == -1 && errno == E2BIG) { + return valuelength; + } return retval ? retval : valuelength; #elif defined(HAVE_ATTROPEN) @@ -126,7 +131,9 @@ ssize_t rep_fgetxattr (int filedes, const char *name, void *value, size_t size) const char *attrname = ((s=strchr(name, '.')) == NULL) ? name : s + 1; if((retval=extattr_get_fd(filedes, attrnamespace, attrname, NULL, 0)) >= 0) { - if(retval > size) { + if (size == 0) { + return retval; + } else if (retval > size) { errno = ERANGE; return -1; } @@ -143,7 +150,9 @@ ssize_t rep_fgetxattr (int filedes, const char *name, void *value, size_t size) if (strncmp(name, "system", 6) == 0) flags |= ATTR_ROOT; retval = attr_getf(filedes, attrname, (char *)value, &valuelength, flags); - + if (size == 0 && retval == -1 && errno == E2BIG) { + return valuelength; + } return retval ? retval : valuelength; #elif defined(HAVE_ATTROPEN) ssize_t ret = -1; -- 1.7.11.7
-- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
