aboutsummaryrefslogtreecommitdiff
path: root/xmalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'xmalloc.c')
-rw-r--r--xmalloc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/xmalloc.c b/xmalloc.c
index c90b97dc..a9a6685c 100644
--- a/xmalloc.c
+++ b/xmalloc.c
@@ -4,6 +4,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <wchar.h>
#include <syslog.h>
#include "xmalloc.h"
@@ -54,6 +55,12 @@ xstrdup(const char *str)
return check_alloc(strdup(str));
}
+wchar_t *
+xwcsdup(const wchar_t *str)
+{
+ return check_alloc(wcsdup(str));
+}
+
char *
xstrndup(const char *str, size_t n)
{