summaryrefslogtreecommitdiff
path: root/lang/ossp-js/patches/patch-ad
blob: b78dc84ebee51382013148fbc51bc7717c0f159e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$NetBSD: patch-ad,v 1.2 2015/12/29 23:34:53 dholland Exp $

Use memcpy correctly. See patch-ac.

--- config.h.in.orig	2007-02-08 04:39:29.000000000 -0500
+++ config.h.in
@@ -10,10 +10,10 @@
 #define __VA_COPY_USE_C99(d, s) va_copy((d), (s))
 
 /* Predefined possible va_copy() implementation (id: CPP) */
-#define __VA_COPY_USE_CPP(d, s) memcpy((void *)(d), (void *)(s)), sizeof(*(s))
+#define __VA_COPY_USE_CPP(d, s) memcpy((void *)(d), (void *)(s), sizeof(*(s)))
 
 /* Predefined possible va_copy() implementation (id: CPS) */
-#define __VA_COPY_USE_CPS(d, s) memcpy((void *)&(d), (void *)&(s)), sizeof((s))
+#define __VA_COPY_USE_CPS(d, s) memcpy((void *)&(d), (void *)&(s), sizeof((s)))
 
 /* Predefined possible va_copy() implementation (id: GCB) */
 #define __VA_COPY_USE_GCB(d, s) __builtin_va_copy((d), (s))