diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2024-11-16 23:18:26 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2024-11-16 23:18:26 +0100 |
commit | 3ead85e09663b7a1232bdeee385d6bfaf0c79a9e (patch) | |
tree | c1f7644922b3957a2f5570415d4de808a3185ac2 | |
parent | d1d0d8f4d628a2ab8c851d88fc0bc1e05aa5febc (diff) |
Fix 64b buildsnsmux
-rw-r--r-- | lib.c | 2 | ||||
-rw-r--r-- | nsmux.c | 12 | ||||
-rw-r--r-- | nsmux.h | 2 |
3 files changed, 9 insertions, 7 deletions
@@ -57,7 +57,7 @@ error_t dir_entries_get (file_t dir, char *data; /*The size of `data` */ - size_t data_size; + mach_msg_type_name_t data_size; /*The number of entries in `data` */ int entries_num; @@ -1095,7 +1095,7 @@ error_t S_ISLNK and S_IFSOCK are handled elsewhere. */ error_t short_circuited_callback1 (void *cookie1, void *cookie2, uid_t * uid, gid_t * gid, - char **argz, size_t * argz_len) + char **argz, mach_msg_type_name_t * argz_len) { struct node *np = cookie1; error_t err; @@ -1449,7 +1449,7 @@ error_t /*Attempts to set the passive translator record for `file` passing `argz`*/ error_t netfs_set_translator - (struct iouser * cred, struct node * node, const char *argz, size_t arglen) + (struct iouser * cred, struct node * node, const char *argz, mach_msg_type_number_t arglen) { LOG_MSG ("netfs_set_translator"); @@ -1556,17 +1556,19 @@ error_t char *buf = data; /*Try to read the requested information from the file */ - err = io_read (np->nn->port, &buf, len, offset, *len); + mach_msg_type_number_t num = *len; + err = io_read (np->nn->port, &buf, &num, offset, num); + *len = num; /*If some data has been read successfully */ if (!err && (buf != data)) { /*copy the data from the buffer into which is has been read into the supplied receiver */ - memcpy (data, buf, *len); + memcpy (data, buf, num); /*unmap the new buffer */ - munmap (buf, *len); + munmap (buf, num); } /*Return the result of reading */ @@ -183,7 +183,7 @@ error_t /*Attempts to set the passive translator record for `file` passing `argz`*/ error_t netfs_set_translator - (struct iouser *cred, struct node *node, const char *argz, size_t arglen); + (struct iouser *cred, struct node *node, const char *argz, mach_msg_type_number_t arglen); /*---------------------------------------------------------------------------*/ /*Attempts to call chflags for `node`*/ error_t |