diff options
author | Sergey Bugaev <bugaevc@gmail.com> | 2023-02-18 23:37:10 +0300 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-02-20 00:33:47 +0100 |
commit | 32fff41bde1965ce89af07e27f2fc6dbb5baee89 (patch) | |
tree | cdb33e1632a6e1bf6c6732763a93f8b13194f9ec /sysdeps | |
parent | e48f33e76be2a3baa920b7e9f472354f7ff0c0a6 (diff) | |
download | glibc-32fff41bde1965ce89af07e27f2fc6dbb5baee89.zip glibc-32fff41bde1965ce89af07e27f2fc6dbb5baee89.tar.gz glibc-32fff41bde1965ce89af07e27f2fc6dbb5baee89.tar.bz2 |
hurd: Use proper integer types
Fix a few more cases of build errors caused by mismatched types. This is a
continuation of f4315054b46d5e58b44a709a51943fb73f846afb.
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
Message-Id: <20230218203717.373211-3-bugaevc@gmail.com>
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/mach/hurd/getpriority.c | 6 | ||||
-rw-r--r-- | sysdeps/mach/hurd/if_index.c | 2 | ||||
-rw-r--r-- | sysdeps/mach/hurd/ifreq.c | 2 | ||||
-rw-r--r-- | sysdeps/mach/hurd/readdir64.c | 4 | ||||
-rw-r--r-- | sysdeps/mach/hurd/readdir64_r.c | 4 |
5 files changed, 11 insertions, 7 deletions
diff --git a/sysdeps/mach/hurd/getpriority.c b/sysdeps/mach/hurd/getpriority.c index 9869c2f..45b3221 100644 --- a/sysdeps/mach/hurd/getpriority.c +++ b/sysdeps/mach/hurd/getpriority.c @@ -30,7 +30,7 @@ __getpriority (enum __priority_which which, id_t who) int maxpri = INT_MIN; struct procinfo *pip; /* Just for sizeof. */ int pibuf[sizeof *pip + 2 * sizeof (pip->threadinfos[0])], *pi = pibuf; - size_t pisize = sizeof pibuf / sizeof pibuf[0]; + mach_msg_type_number_t pisize = sizeof pibuf / sizeof pibuf[0]; error_t getonepriority (pid_t pid, struct procinfo *pip) { @@ -39,9 +39,9 @@ __getpriority (enum __priority_which which, id_t who) else { int *oldpi = pi; - size_t oldpisize = pisize; + mach_msg_type_number_t oldpisize = pisize; char *tw = 0; - size_t twsz = 0; + mach_msg_type_number_t twsz = 0; int flags = PI_FETCH_TASKINFO; onerr = __USEPORT (PROC, __proc_getprocinfo (port, pid, &flags, &pi, &pisize, diff --git a/sysdeps/mach/hurd/if_index.c b/sysdeps/mach/hurd/if_index.c index a447226..c8ad7e7 100644 --- a/sysdeps/mach/hurd/if_index.c +++ b/sysdeps/mach/hurd/if_index.c @@ -99,7 +99,7 @@ __if_nameindex (void) nifs = 0; else { - size_t len = sizeof data; + mach_msg_type_number_t len = sizeof data; err = __pfinet_siocgifconf (server, -1, &ifc.ifc_buf, &len); if (err == MACH_SEND_INVALID_DEST || err == MIG_SERVER_DIED) { diff --git a/sysdeps/mach/hurd/ifreq.c b/sysdeps/mach/hurd/ifreq.c index ef210c3..394d020 100644 --- a/sysdeps/mach/hurd/ifreq.c +++ b/sysdeps/mach/hurd/ifreq.c @@ -37,7 +37,7 @@ __ifreq (struct ifreq **ifreqs, int *num_ifs, int sockfd) else { char *data = NULL; - size_t len = 0; + mach_msg_type_number_t len = 0; error_t err = __pfinet_siocgifconf (server, -1, &data, &len); if (err == MACH_SEND_INVALID_DEST || err == MIG_SERVER_DIED) { diff --git a/sysdeps/mach/hurd/readdir64.c b/sysdeps/mach/hurd/readdir64.c index 47829d9..ceb7083 100644 --- a/sysdeps/mach/hurd/readdir64.c +++ b/sysdeps/mach/hurd/readdir64.c @@ -43,12 +43,13 @@ __readdir64 (DIR *dirp) /* We've emptied out our buffer. Refill it. */ char *data = dirp->__data; + mach_msg_type_number_t data_size = dirp->__size; int nentries; error_t err; if (err = HURD_FD_PORT_USE (dirp->__fd, __dir_readdir (port, - &data, &dirp->__size, + &data, &data_size, dirp->__entry_ptr, -1, 0, &nentries))) { @@ -57,6 +58,7 @@ __readdir64 (DIR *dirp) break; } + dirp->__size = data_size; /* DATA now corresponds to entry index DIRP->__entry_ptr. */ dirp->__entry_data = dirp->__entry_ptr; diff --git a/sysdeps/mach/hurd/readdir64_r.c b/sysdeps/mach/hurd/readdir64_r.c index 7e438aa..4f4252c2 100644 --- a/sysdeps/mach/hurd/readdir64_r.c +++ b/sysdeps/mach/hurd/readdir64_r.c @@ -45,11 +45,12 @@ __readdir64_r (DIR *dirp, struct dirent64 *entry, struct dirent64 **result) /* We've emptied out our buffer. Refill it. */ char *data = dirp->__data; + mach_msg_type_number_t data_size = dirp->__size; int nentries; if (err = HURD_FD_PORT_USE (dirp->__fd, __dir_readdir (port, - &data, &dirp->__size, + &data, &data_size, dirp->__entry_ptr, -1, 0, &nentries))) { @@ -58,6 +59,7 @@ __readdir64_r (DIR *dirp, struct dirent64 *entry, struct dirent64 **result) break; } + dirp->__size = data_size; /* DATA now corresponds to entry index DIRP->__entry_ptr. */ dirp->__entry_data = dirp->__entry_ptr; |