Blob Blame History Raw
--- cpdup/compat_sun.c.glibc	2010-07-19 21:11:48.000000000 +0200
+++ cpdup/compat_sun.c	2010-11-02 19:22:14.660562440 +0100
@@ -5,38 +5,6 @@
 #include "compat_sun.h"
 #include <stdlib.h>
 
-int
-vasprintf(char **str, const char *format, va_list ap)
-{
-    char *newstr;
-    char dummy[2];
-    int result;
-
-    if ((result = vsnprintf(dummy, 2, format, ap)) < 0) {
-	*str = NULL;
-	return (result);
-    }
-    if ((*str = malloc(result + 1)) == NULL)
-	return (-1);
-    if ((result = vsnprintf(*str, result + 1, format, ap)) < 0) {
-	free(*str);
-	*str = NULL;
-    }
-    return (result);
-}
-
-int
-asprintf(char **str, const char *format, ...)
-{
-    va_list ap;
-    int result;
-
-    va_start(ap, format);
-    result = vasprintf(str, format, ap);
-    va_end(ap);
-    return (result);
-}
-
 #ifndef NOMD5
 
 #include <sys/types.h>
--- cpdup/compat_sun.h.glibc	2010-07-05 20:02:07.000000000 +0200
+++ cpdup/compat_sun.h	2010-11-02 19:21:51.302922733 +0100
@@ -4,8 +4,7 @@
 #include <stdio.h>
 #include <stdarg.h>
 
-int vasprintf(char **str, const char *format, va_list ap);
-int asprintf(char **str, const char *format, ...);
+size_t strlcpy(char *dst, const char *src, size_t size);
 
 #ifndef NOMD5