mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
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 <behlendorf1@llnl.gov>
This commit is contained in:
parent
e5dc681a50
commit
0ccd9d24e4
@ -249,7 +249,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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user