diff options
author | Matthew Macy <[email protected]> | 2019-10-10 09:47:06 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-10-10 09:47:06 -0700 |
commit | e4f5fa12290016b2f1fd6a5b4c7e5733c788c863 (patch) | |
tree | 51a33853a1161198daf1195ec09da33e9a905392 /module/zfs/dsl_prop.c | |
parent | c5858ff9462719be60b2ffb0065dd01508a63162 (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_prop.c')
-rw-r--r-- | module/zfs/dsl_prop.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/module/zfs/dsl_prop.c b/module/zfs/dsl_prop.c index 9f892acdb..df199cf6a 100644 --- a/module/zfs/dsl_prop.c +++ b/module/zfs/dsl_prop.c @@ -150,8 +150,8 @@ dsl_prop_get_dd(dsl_dir_t *dd, const char *propname, if (err == ENOENT) err = dodefault(prop, intsz, numints, buf); - strfree(inheritstr); - strfree(recvdstr); + kmem_strfree(inheritstr); + kmem_strfree(recvdstr); return (err); } @@ -190,7 +190,7 @@ dsl_prop_get_ds(dsl_dataset_t *ds, const char *propname, char *inheritstr = kmem_asprintf("%s%s", propname, ZPROP_INHERIT_SUFFIX); err = zap_contains(mos, zapobj, inheritstr); - strfree(inheritstr); + kmem_strfree(inheritstr); if (err != 0 && err != ENOENT) return (err); } @@ -201,7 +201,7 @@ dsl_prop_get_ds(dsl_dataset_t *ds, const char *propname, ZPROP_RECVD_SUFFIX); err = zap_lookup(mos, zapobj, recvdstr, intsz, numints, buf); - strfree(recvdstr); + kmem_strfree(recvdstr); if (err != ENOENT) { if (setpoint != NULL && err == 0) (void) strcpy(setpoint, @@ -424,7 +424,7 @@ dsl_prop_predict(dsl_dir_t *dd, const char *propname, panic("unexpected property source: %d", source); } - strfree(recvdstr); + kmem_strfree(recvdstr); if (err == ENOENT) return (0); @@ -752,8 +752,8 @@ dsl_prop_set_sync_impl(dsl_dataset_t *ds, const char *propname, cmn_err(CE_PANIC, "unexpected property source: %d", source); } - strfree(inheritstr); - strfree(recvdstr); + kmem_strfree(inheritstr); + kmem_strfree(recvdstr); if (isint) { VERIFY0(dsl_prop_get_int_ds(ds, propname, &intval)); @@ -1020,7 +1020,7 @@ dsl_prop_get_all_impl(objset_t *mos, uint64_t propobj, valstr = kmem_asprintf("%s%s", propname, ZPROP_INHERIT_SUFFIX); err = zap_contains(mos, propobj, valstr); - strfree(valstr); + kmem_strfree(valstr); if (err == 0) continue; if (err != ENOENT) |