summaryrefslogtreecommitdiffstats
path: root/include/sys/zfs_context.h
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 /include/sys/zfs_context.h
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 'include/sys/zfs_context.h')
-rw-r--r--include/sys/zfs_context.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h
index a55009f35..455c4275d 100644
--- a/include/sys/zfs_context.h
+++ b/include/sys/zfs_context.h
@@ -722,7 +722,8 @@ extern uint32_t zone_get_hostid(void *zonep);
extern char *kmem_vasprintf(const char *fmt, va_list adx);
extern char *kmem_asprintf(const char *fmt, ...);
-#define strfree(str) kmem_free((str), strlen(str) + 1)
+#define kmem_strfree(str) kmem_free((str), strlen(str) + 1)
+#define kmem_strdup(s) strdup(s)
/*
* Hostname information