summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2025-09-23 21:38:46 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2025-09-23 21:43:59 +0200
commit7ebac6bf9438a4338497a2e80cdcdffdd91c2542 (patch)
tree2614140f18e55a162a58eef1effa6669c4842e0b
parentc40832acffef059ae6e24c4f80feff3131ec4832 (diff)
hurd: Fix building on i686-gnu
vm_size_t and rlim_t may not be the same type. Fixes commit 802b0eba519b1333c639fd0e1b55222099df9263 ("hurd: implement RLIMIT_AS against Mach RPCs")
-rw-r--r--hurd/hurdrlimit.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/hurd/hurdrlimit.c b/hurd/hurdrlimit.c
index 271117b1e0..4bbb9c4257 100644
--- a/hurd/hurdrlimit.c
+++ b/hurd/hurdrlimit.c
@@ -38,8 +38,12 @@ init_rlimit (void)
__mutex_init (&_hurd_rlimit_lock);
#ifdef HAVE_MACH_VM_GET_SIZE_LIMIT
- __vm_get_size_limit (__mach_task_self (),
- &_hurd_rlimits[RLIMIT_AS].rlim_cur, &_hurd_rlimits[RLIMIT_AS].rlim_max);
+ vm_size_t current, max;
+ if (__vm_get_size_limit (__mach_task_self (), &current, &max) == KERN_SUCCESS)
+ {
+ _hurd_rlimits[RLIMIT_AS].rlim_cur = current;
+ _hurd_rlimits[RLIMIT_AS].rlim_max = max;
+ }
#endif
for (i = 0; i < RLIM_NLIMITS; ++i)