summaryrefslogtreecommitdiff
path: root/x11/wdm/files/patch-src::wdm::loghelpers.c
blob: ddaa4081d49d87bf6194f81bef4545a5a7c8f7b0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- src/wdm/loghelpers.c.orig	Sun Jun  1 17:00:09 2003
+++ src/wdm/loghelpers.c	Sun Jun  1 23:30:40 2003
@@ -26,6 +26,21 @@
 #include <sys/wait.h>
 #include <unistd.h>
 
+#ifdef __FreeBSD__
+static char *
+wstrndup(const char *src, size_t size)
+{
+	char *dst;
+
+	dst = malloc(size + 1);
+	if (dst == NULL)
+		return (NULL);
+	dst[size] = '\0';
+	strncpy(dst, src, size);
+	return (dst);
+}
+#endif
+
 /*
  * Function that treats buffer as set of lines separated with '\n'
  * These lines will be directed to WDMLogMessage function with