aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/dsl_dataset.c
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2019-10-10 09:47:06 -0700
committerBrian Behlendorf <[email protected]>2019-10-10 09:47:06 -0700
commite4f5fa12290016b2f1fd6a5b4c7e5733c788c863 (patch)
tree51a33853a1161198daf1195ec09da33e9a905392 /module/zfs/dsl_dataset.c
parentc5858ff9462719be60b2ffb0065dd01508a63162 (diff)
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 <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matt Macy <[email protected]> Closes #9433
Diffstat (limited to 'module/zfs/dsl_dataset.c')
-rw-r--r--module/zfs/dsl_dataset.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/module/zfs/dsl_dataset.c b/module/zfs/dsl_dataset.c
index 8673c6d31..aa37214d0 100644
--- a/module/zfs/dsl_dataset.c
+++ b/module/zfs/dsl_dataset.c
@@ -2435,7 +2435,7 @@ get_receive_resume_stats_impl(dsl_dataset_t *ds)
kmem_free(compressed, packed_size);
return (propval);
}
- return (strdup(""));
+ return (kmem_strdup(""));
}
/*
@@ -2458,7 +2458,7 @@ get_child_receive_stats(dsl_dataset_t *ds)
dsl_dataset_rele(recv_ds, FTAG);
return (propval);
}
- return (strdup(""));
+ return (kmem_strdup(""));
}
static void
@@ -2474,9 +2474,9 @@ get_receive_resume_stats(dsl_dataset_t *ds, nvlist_t *nv)
dsl_prop_nvlist_add_string(nv,
ZFS_PROP_RECEIVE_RESUME_TOKEN, childval);
}
- strfree(childval);
+ kmem_strfree(childval);
}
- strfree(propval);
+ kmem_strfree(propval);
}
uint64_t