diff options
author | Sergey Bugaev <bugaevc@gmail.com> | 2023-02-12 14:10:33 +0300 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-02-12 15:52:07 +0100 |
commit | f4315054b46d5e58b44a709a51943fb73f846afb (patch) | |
tree | 08dd446b613f6549260c17b3060453fa040eb4d8 /hurd | |
parent | 8a86e7b6a67f21294ada5bf67f3484ae3e134848 (diff) | |
download | glibc-f4315054b46d5e58b44a709a51943fb73f846afb.tar glibc-f4315054b46d5e58b44a709a51943fb73f846afb.tar.gz glibc-f4315054b46d5e58b44a709a51943fb73f846afb.tar.bz2 glibc-f4315054b46d5e58b44a709a51943fb73f846afb.zip |
hurd: Use mach_msg_type_number_t where appropriate
It has been decided that on x86_64, mach_msg_type_number_t stays 32-bit.
Therefore, it's not possible to use mach_msg_type_number_t
interchangeably with size_t, in particular this breaks when a pointer to
a variable is passed to a MIG routine.
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
Message-Id: <20230212111044.610942-3-bugaevc@gmail.com>
Diffstat (limited to 'hurd')
-rw-r--r-- | hurd/hurdioctl.c | 2 | ||||
-rw-r--r-- | hurd/hurdprio.c | 2 | ||||
-rw-r--r-- | hurd/lookup-retry.c | 2 | ||||
-rw-r--r-- | hurd/xattr.c | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/hurd/hurdioctl.c b/hurd/hurdioctl.c index e9a6a7ea45..59e6a5c1f6 100644 --- a/hurd/hurdioctl.c +++ b/hurd/hurdioctl.c @@ -311,7 +311,7 @@ static int siocgifconf (int fd, int request, struct ifconf *ifc) { error_t err; - size_t data_len = ifc->ifc_len; + mach_msg_type_number_t data_len = ifc->ifc_len; char *data = ifc->ifc_buf; if (data_len <= 0) diff --git a/hurd/hurdprio.c b/hurd/hurdprio.c index dbeb272bdc..954d3987f1 100644 --- a/hurd/hurdprio.c +++ b/hurd/hurdprio.c @@ -58,7 +58,7 @@ _hurd_priority_which_map (enum __priority_which which, int who, int *oldpi = pi; mach_msg_type_number_t oldpisize = pisize; char *tw = 0; - size_t twsz = 0; + mach_msg_type_number_t twsz = 0; err = __USEPORT (PROC, __proc_getprocinfo (port, pids[i], &pi_flags, &pi, &pisize, diff --git a/hurd/lookup-retry.c b/hurd/lookup-retry.c index 0d344026e4..8850c4fd27 100644 --- a/hurd/lookup-retry.c +++ b/hurd/lookup-retry.c @@ -162,7 +162,7 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port) { char buf[1024]; char *trans = buf; - size_t translen = sizeof buf; + mach_msg_type_number_t translen = sizeof buf; err = __file_get_translator (*result, &trans, &translen); if (!err diff --git a/hurd/xattr.c b/hurd/xattr.c index f98e548c19..48914bcf26 100644 --- a/hurd/xattr.c +++ b/hurd/xattr.c @@ -60,7 +60,7 @@ _hurd_xattr_get (io_t port, const char *name, void *value, size_t *size) if (!strcmp (name, "translator")) { char *buf = value; - size_t bufsz = value ? *size : 0; + mach_msg_type_number_t bufsz = value ? *size : 0; error_t err = __file_get_translator (port, &buf, &bufsz); if (err) return err; @@ -144,7 +144,7 @@ _hurd_xattr_set (io_t port, const char *name, const void *value, size_t size, { /* Must make sure it's already there. */ char *buf = NULL; - size_t bufsz = 0; + mach_msg_type_number_t bufsz = 0; error_t err = __file_get_translator (port, &buf, &bufsz); if (err) return err; |