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 --- cmd/ztest/ztest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/ztest') diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c index 24ea49c10..1aa1d3860 100644 --- a/cmd/ztest/ztest.c +++ b/cmd/ztest/ztest.c @@ -2863,7 +2863,7 @@ ztest_spa_upgrade(ztest_ds_t *zd, uint64_t id) zpool_prop_to_name(ZPOOL_PROP_VERSION))); spa_close(spa, FTAG); - strfree(name); + kmem_strfree(name); mutex_exit(&ztest_vdev_lock); } -- cgit v1.2.3