mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 03:37:45 +03:00
Fix strdup conflict on other platforms
In the FreeBSD kernel the strdup signature is: ``` char *strdup(const char *__restrict, struct malloc_type *); ``` It's unfortunate that the developers have chosen to change the signature of libc functions - but it's what I have to deal with. Reviewed-by: Jorgen Lundman <lundman@lundman.net> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #9433
This commit is contained in:
committed by
Brian Behlendorf
parent
c5858ff946
commit
e4f5fa1229
@@ -1404,7 +1404,7 @@ dmu_objset_snapshot_one(const char *fsname, const char *snapname)
|
||||
nvlist_t *snaps = fnvlist_alloc();
|
||||
|
||||
fnvlist_add_boolean(snaps, longsnap);
|
||||
strfree(longsnap);
|
||||
kmem_strfree(longsnap);
|
||||
err = dsl_dataset_snapshot(snaps, NULL, NULL);
|
||||
fnvlist_free(snaps);
|
||||
return (err);
|
||||
@@ -2795,7 +2795,7 @@ dmu_objset_find_impl(spa_t *spa, const char *name,
|
||||
err = dmu_objset_find_impl(spa, child,
|
||||
func, arg, flags);
|
||||
dsl_pool_config_enter(dp, FTAG);
|
||||
strfree(child);
|
||||
kmem_strfree(child);
|
||||
if (err != 0)
|
||||
break;
|
||||
}
|
||||
@@ -2833,7 +2833,7 @@ dmu_objset_find_impl(spa_t *spa, const char *name,
|
||||
dsl_pool_config_exit(dp, FTAG);
|
||||
err = func(child, arg);
|
||||
dsl_pool_config_enter(dp, FTAG);
|
||||
strfree(child);
|
||||
kmem_strfree(child);
|
||||
if (err != 0)
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user