summaryrefslogtreecommitdiff
path: root/defines.h
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2014-06-12 05:22:49 +1000
committerDarren Tucker <dtucker@zip.com.au>2014-06-12 05:22:49 +1000
commitcf5392c2db2bb1dbef9818511d34056404436109 (patch)
treef452b03aaee1d1d0c512c501a00b7a796fc7f3eb /defines.h
parent58538d795e0b662f2f4e5a7193f1204bbe992ddd (diff)
- (dtucker) [defines.h] Add va_copy if we don't already have it, taken from
openbsd-compat/bsd-asprintf.c.
Diffstat (limited to 'defines.h')
-rw-r--r--defines.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/defines.h b/defines.h
index b3df1e23..46f18d34 100644
--- a/defines.h
+++ b/defines.h
@@ -25,7 +25,7 @@
#ifndef _DEFINES_H
#define _DEFINES_H
-/* $Id: defines.h,v 1.180 2014/05/21 07:06:47 djm Exp $ */
+/* $Id: defines.h,v 1.181 2014/06/11 19:22:50 dtucker Exp $ */
/* Constants */
@@ -822,4 +822,12 @@ struct winsize {
# define arc4random_stir()
#endif
+#ifndef HAVE_VA_COPY
+# ifdef HAVE___VA_COPY
+# define va_copy(dest, src) __va_copy(dest, src)
+# else
+# define va_copy(dest, src) (dest) = (src)
+# endif
+#endif
+
#endif /* _DEFINES_H */