From 0abb1942e8be584d56a1b35b2d1911cbe9f5bbd1 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 29 Sep 2011 23:14:32 +0000 Subject: Thu Sep 29 23:14:32 UTC 2011 --- testing/logrotate/logrotate-3.8.1-noasprintf.patch | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 testing/logrotate/logrotate-3.8.1-noasprintf.patch (limited to 'testing/logrotate/logrotate-3.8.1-noasprintf.patch') diff --git a/testing/logrotate/logrotate-3.8.1-noasprintf.patch b/testing/logrotate/logrotate-3.8.1-noasprintf.patch new file mode 100644 index 000000000..be0c08062 --- /dev/null +++ b/testing/logrotate/logrotate-3.8.1-noasprintf.patch @@ -0,0 +1,53 @@ +--- logrotate-3.8.0.orig/config.c 2011-06-21 04:12:02.000000000 -0400 ++++ logrotate-3.8.0/config.c 2011-07-12 13:47:36.274319050 -0400 +@@ -41,39 +41,6 @@ + #include "asprintf.c" + #endif + +-#if !defined(asprintf) +-#include +- +-int asprintf(char **string_ptr, const char *format, ...) +-{ +- va_list arg; +- char *str; +- int size; +- int rv; +- +- va_start(arg, format); +- size = vsnprintf(NULL, 0, format, arg); +- size++; +- va_start(arg, format); +- str = malloc(size); +- if (str == NULL) { +- va_end(arg); +- /* +- * Strictly speaking, GNU asprintf doesn't do this, +- * but the caller isn't checking the return value. +- */ +- fprintf(stderr, "failed to allocate memory\\n"); +- exit(1); +- } +- rv = vsnprintf(str, size, format, arg); +- va_end(arg); +- +- *string_ptr = str; +- return (rv); +-} +- +-#endif +- + #if !defined(strndup) + char *strndup(const char *s, size_t n) + { +--- logrotate-3.8.0.orig/logrotate.h 2011-06-21 04:12:02.000000000 -0400 ++++ logrotate-3.8.0/logrotate.h 2011-07-12 13:47:38.949285608 -0400 +@@ -66,8 +66,5 @@ extern int numLogs; + extern int debug; + + int readAllConfigPaths(const char **paths); +-#if !defined(asprintf) +-int asprintf(char **string_ptr, const char *format, ...); +-#endif + + #endif -- cgit v1.2.3-54-g00ecf