summaryrefslogtreecommitdiffstats
path: root/lib/libzfs/libzfs_mount.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2010-08-26 09:52:40 -0700
committerBrian Behlendorf <[email protected]>2010-08-27 15:34:02 -0700
commit0ccd9d24e4fdbe9cd07f838d0a62083e8eca95f2 (patch)
tree0e32b4e0d661f90769556f9570d6f2c204e3902e /lib/libzfs/libzfs_mount.c
parente5dc681a50a41d42c18b52abc8d5a3c2a357bdaa (diff)
Fix gcc init pragma warnings
Use constructor attribute on non-Solaris platforms. The #pragma init/fini ->__attribute__((constructor/destructor)) conversions, these should go upstream. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'lib/libzfs/libzfs_mount.c')
-rw-r--r--lib/libzfs/libzfs_mount.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libzfs/libzfs_mount.c b/lib/libzfs/libzfs_mount.c
index 922220620..c31a12371 100644
--- a/lib/libzfs/libzfs_mount.c
+++ b/lib/libzfs/libzfs_mount.c
@@ -518,8 +518,12 @@ static void (*_sa_update_sharetab_ts)(sa_handle_t);
* 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)
{