about summary refs log tree commit diff
path: root/hurd/hurdrlimit.c
diff options
context:
space:
mode:
Diffstat (limited to 'hurd/hurdrlimit.c')
-rw-r--r--hurd/hurdrlimit.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/hurd/hurdrlimit.c b/hurd/hurdrlimit.c
index 17535c2851..4d16bd4f3f 100644
--- a/hurd/hurdrlimit.c
+++ b/hurd/hurdrlimit.c
@@ -19,6 +19,7 @@
 #include <hurd.h>
 #include <lock-intern.h>
 #include <hurd/resource.h>
+#include "set-hooks.h"
 
 /* This must be given an initializer, or the a.out linking rules will
    not include the entire file when this symbol is referenced. */
@@ -29,7 +30,7 @@ struct rlimit _hurd_rlimits[RLIM_NLIMITS] = { { 0, }, };
    mutex_init is still required below just in case of unexec.  */
 struct mutex _hurd_rlimit_lock = { SPIN_LOCK_INITIALIZER, };
 
-static void
+static void attribute_used_retain
 init_rlimit (void)
 {
   int i;
@@ -52,7 +53,5 @@ init_rlimit (void)
 	  }
 #undef	I
     }
-
-  (void) &init_rlimit;
 }
-text_set_element (_hurd_preinit_hook, init_rlimit);
+SET_RELHOOK (_hurd_preinit_hook, init_rlimit);