about summary refs log tree commit diff
path: root/src/libs6/s6_accessrules_backend_fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs6/s6_accessrules_backend_fs.c')
-rw-r--r--src/libs6/s6_accessrules_backend_fs.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libs6/s6_accessrules_backend_fs.c b/src/libs6/s6_accessrules_backend_fs.c
index 5723db6..17119c9 100644
--- a/src/libs6/s6_accessrules_backend_fs.c
+++ b/src/libs6/s6_accessrules_backend_fs.c
@@ -1,5 +1,6 @@
 /* ISC license. */
 
+#include <sys/types.h>
 #include <unistd.h>
 #include <errno.h>
 #include <skalibs/bytestr.h>
@@ -8,11 +9,11 @@
 #include <skalibs/djbunix.h>
 #include <s6/accessrules.h>
 
-s6_accessrules_result_t s6_accessrules_backend_fs (char const *key, unsigned int keylen, void *data, s6_accessrules_params_t *params)
+s6_accessrules_result_t s6_accessrules_backend_fs (char const *key, size_t keylen, void *data, s6_accessrules_params_t *params)
 {
   char *dir = data ;
-  unsigned int dirlen = str_len(dir) ;
-  unsigned int envbase = params->env.len ;
+  size_t dirlen = str_len(dir) ;
+  size_t envbase = params->env.len ;
   int wasnull = !params->env.s ;
   {
     char tmp[dirlen + keylen + 10] ;
@@ -40,7 +41,7 @@ s6_accessrules_result_t s6_accessrules_backend_fs (char const *key, unsigned int
     }
     byte_copy(tmp + dirlen + keylen + 2, 5, "exec") ;
     {
-      register int r = openreadnclose(tmp, params->exec.s + params->exec.len, 4096) ;
+      register ssize_t r = openreadnclose(tmp, params->exec.s + params->exec.len, 4096) ;
       if ((r < 0) && (errno != EACCES) && (errno != ENOENT))
       {
         if (wasnull) stralloc_free(&params->env) ;