fixed solaris build

Sat, 17 Oct 2015 18:07:04 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sat, 17 Oct 2015 18:07:04 +0200
changeset 100
e9bb8449df02
parent 99
b9a6af0ae41a
child 101
7fbcdbad0baa

fixed solaris build

make/solaris.mk file | annotate | diff | comparison | revisions
src/server/daemon/acl.c file | annotate | diff | comparison | revisions
src/server/safs/pathcheck.c file | annotate | diff | comparison | revisions
--- a/make/solaris.mk	Fri Oct 16 19:23:49 2015 +0200
+++ b/make/solaris.mk	Sat Oct 17 18:07:04 2015 +0200
@@ -31,7 +31,7 @@
 CFLAGS += -DSOLARIS
 LDFLAGS += -lsocket -lnsl -lsendfile -lposix4 -lpthread -ldl -lm -lxerces-c -lldap
 
-PLUGINS = java
+#PLUGINS = java
 
 
 # platform dependend source files
--- a/src/server/daemon/acl.c	Fri Oct 16 19:23:49 2015 +0200
+++ b/src/server/daemon/acl.c	Sat Oct 17 18:07:04 2015 +0200
@@ -319,10 +319,8 @@
         }
         sstr_t wd = sstr(cwd);
         sstr_t pp = sstr(path);
-        p.length = wd.length + pp.length + 1;
-        p.ptr = malloc(p.length + 1);
-        p = sstrncat(p, 3, wd, sstrn("/", 1), pp);
-        p.ptr[p.length] = '\0';
+        
+        p = sstrcat(3, wd, sstrn("/", 1), pp);
     } else {
         p = sstrdup(sstr(path));
     }
--- a/src/server/safs/pathcheck.c	Fri Oct 16 19:23:49 2015 +0200
+++ b/src/server/safs/pathcheck.c	Sat Oct 17 18:07:04 2015 +0200
@@ -64,7 +64,7 @@
     }
     
     uint32_t access_mask = 0;
-    size_t n = 0;
+    ssize_t n = 0;
     sstr_t *rights = sstrsplit(sstr(mask_str), sstrn(",", 1), &n);
     for(int i=0;i<n;i++) {
         sstr_t right = rights[i];

mercurial