From: Andrew Tridgell Date: Tue, 23 Mar 2010 18:06:25 +0000 (+1100) Subject: libreplace: fixed declaration of dprintf() on FreeBSD X-Git-Tag: samba-3.6.0pre1~4118 X-Git-Url: http://git.samba.org/samba.git/?p=samba.git;a=commitdiff_plain;h=a599319d0a389ff0c31dae8068cd7a78352aa9e7 libreplace: fixed declaration of dprintf() on FreeBSD --- diff --git a/lib/replace/replace.c b/lib/replace/replace.c index f2dcb10ddca..e4b97a8913e 100644 --- a/lib/replace/replace.c +++ b/lib/replace/replace.c @@ -705,7 +705,7 @@ void *rep_memmem(const void *haystack, size_t haystacklen, #endif #ifndef HAVE_VDPRINTF -int vdprintf(int fd, const char *format, va_list ap) +int rep_vdprintf(int fd, const char *format, va_list ap) { char *s = NULL; int ret; @@ -722,7 +722,7 @@ int vdprintf(int fd, const char *format, va_list ap) #endif #ifndef HAVE_DPRINTF -int dprintf(int fd, const char *format, ...) +int rep_dprintf(int fd, const char *format, ...) { int ret; va_list ap; diff --git a/lib/replace/replace.h b/lib/replace/replace.h index e7578cd60fa..cd73e65beac 100644 --- a/lib/replace/replace.h +++ b/lib/replace/replace.h @@ -336,6 +336,16 @@ int rep_dlclose(void *handle); /* prototype is in system/network.h */ #endif +#ifndef HAVE_VDPRINTF +#define vdprintf rep_vdprintf +int rep_vdprintf(int fd, const char *format, va_list ap); +#endif + +#ifndef HAVE_DPRINTF +#define dprintf rep_dprintf +int rep_dprintf(int fd, const char *format, ...); +#endif + #ifndef PRINTF_ATTRIBUTE #if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) /** Use gcc attribute to check printf fns. a1 is the 1-based index of