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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user