From e4f5fa12290016b2f1fd6a5b4c7e5733c788c863 Mon Sep 17 00:00:00 2001 From: Matthew Macy Date: Thu, 10 Oct 2019 09:47:06 -0700 Subject: 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 Reviewed-by: Brian Behlendorf Signed-off-by: Matt Macy Closes #9433 --- module/zfs/dmu_objset.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/zfs/dmu_objset.c') diff --git a/module/zfs/dmu_objset.c b/module/zfs/dmu_objset.c index f7498854a..2a9464e2a 100644 --- a/module/zfs/dmu_objset.c +++ b/module/zfs/dmu_objset.c @@ -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; } -- cgit v1.2.3