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