]> rtime.felk.cvut.cz Git - l4.git/blobdiff - l4/pkg/l4re_vfs/include/impl/vfs_impl.h
update
[l4.git] / l4 / pkg / l4re_vfs / include / impl / vfs_impl.h
index ff92c310e1655acaa3c705ab2b42574413e22d28..461decdd42935bb210ca2b03f479146e58732efa 100644 (file)
@@ -759,17 +759,21 @@ Vfs::madvise(void *, size_t, int) L4_NOTHROW
 { return 0; }
 
 namespace {
-// use this container construct here to prevent a destructor for
-// our VFS main object is ever called!
-static char vfs_cnt[sizeof(Vfs)] __attribute__((aligned(sizeof(long))));
-static void init_vfs() { new (vfs_cnt) Vfs(); }
-L4_DECLARE_CONSTRUCTOR(init_vfs, INIT_PRIO_VFS_INIT);
-}
+struct Vfs_cnt
+{
 
+  // use this container construct here to prevent a destructor for
+  // our VFS main object is ever called!
+  char vfs_cnt[sizeof(Vfs)] __attribute__((aligned(sizeof(long))));
+  Vfs_cnt() { new (vfs_cnt) Vfs(); }
+};
+
+static Vfs_cnt vfs_cnt __attribute__((init_priority(INIT_PRIO_VFS_INIT)));
+}
 }
 
 //L4Re::Vfs::Ops *__ldso_posix_vfs_ops = &vfs;
-void *__rtld_l4re_env_posix_vfs_ops = &vfs_cnt;
+void *__rtld_l4re_env_posix_vfs_ops = &vfs_cnt.vfs_cnt;
 extern void *l4re_env_posix_vfs_ops __attribute__((alias("__rtld_l4re_env_posix_vfs_ops"), visibility("default")));