diff options
author | Andrew Tridgell <tridge@freebsd.home.tridgell.net> | 2010-03-24 05:06:25 +1100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2012-11-15 12:00:20 +0100 |
commit | fa16d0e4c2329fad8edde5a5e8d626a90caba6d9 (patch) | |
tree | 2126fcae4758410a16b186b964e02c149b98c952 | |
parent | 4bf8dc438318e06ee96dc1b6084dddd8700739e7 (diff) | |
download | samba-fa16d0e4c2329fad8edde5a5e8d626a90caba6d9.tar.gz |
libreplace: fixed declaration of dprintf() on FreeBSD (cherry picked from commit a599319d0a389ff0c31dae8068cd7a78352aa9e7)
-rw-r--r-- | lib/replace/replace.c | 4 | ||||
-rw-r--r-- | lib/replace/replace.h | 10 |
2 files changed, 12 insertions, 2 deletions
diff --git a/lib/replace/replace.c b/lib/replace/replace.c index 83966b1b1fe..b8e4e46c529 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 baf2368130c..519955294f9 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 |