]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
hurd: Fix building on i686-gnu
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 23 Sep 2025 19:38:46 +0000 (21:38 +0200)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 23 Sep 2025 19:43:59 +0000 (21:43 +0200)
vm_size_t and rlim_t may not be the same type.

Fixes commit 802b0eba519b1333c639fd0e1b55222099df9263
("hurd: implement RLIMIT_AS against Mach RPCs")

hurd/hurdrlimit.c

index 271117b1e08f4804082698c66cdd85582539370f..4bbb9c42578d32abbc58dbf3367f437b1c87acdc 100644 (file)
@@ -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)