blob: 665aa9b62a24ddb025bafcd135b077c9523d97da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
Use constructor attribute on non-Solaris platforms.
Index: zfs+chaos4/lib/libuutil/uu_misc.c
===================================================================
--- zfs+chaos4.orig/lib/libuutil/uu_misc.c
+++ zfs+chaos4/lib/libuutil/uu_misc.c
@@ -251,7 +251,13 @@ uu_release_child(void)
uu_release();
}
+#ifdef __GNUC__
+static void
+uu_init(void) __attribute__((constructor));
+#else
#pragma init(uu_init)
+#endif
+
static void
uu_init(void)
{
Index: zfs+chaos4/lib/libzfs/libzfs_mount.c
===================================================================
--- zfs+chaos4.orig/lib/libzfs/libzfs_mount.c
+++ zfs+chaos4/lib/libzfs/libzfs_mount.c
@@ -128,7 +128,13 @@ zfs_share_proto_t share_all_proto[] = {
PROTO_END
};
+#ifdef __GNUC__
+static void
+zfs_iscsi_init(void) __attribute__((constructor));
+#else
#pragma init(zfs_iscsi_init)
+#endif
+
static void
zfs_iscsi_init(void)
{
@@ -548,8 +554,12 @@ static void (*_sa_update_sharetab_ts)(sa
* values to be used later. This is triggered by the runtime loader.
* Make sure the correct ISA version is loaded.
*/
-
+#ifdef __GNUC__
+static void
+_zfs_init_libshare(void) __attribute__((constructor));
+#else
#pragma init(_zfs_init_libshare)
+#endif
static void
_zfs_init_libshare(void)
{
|