X-Git-Url: https://pd.if.org/git/?p=nbds;a=blobdiff_plain;f=runtime%2Fruntime.c;h=14a09f9bb11f19b8a828ca1473c3681d0f9f3910;hp=d4946cfc0b47dd8fb8e673915786a41e44eb4958;hb=a03cf3b0c40e6c3b8b4877b49a64288cb3fcb919;hpb=e592519ef19f890e551c27f47ef8b773bb4860da diff --git a/runtime/runtime.c b/runtime/runtime.c index d4946cf..14a09f9 100644 --- a/runtime/runtime.c +++ b/runtime/runtime.c @@ -18,7 +18,7 @@ typedef struct thread_info { void *restrict arg; } thread_info_t; -void nbd_init (void) { +__attribute__ ((constructor)) void nbd_init (void) { sranddev(); INIT_THREAD_LOCAL(rand_seed_); INIT_THREAD_LOCAL(tid_);