summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-oe/recipes-support/zbar/zbar/0001-undefine-__va_arg_pack.patch
blob: f7d8ba1e964ed740f0172ed25557e55e64ed029d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From f842872244219d9881fbec77054702412b1e16f8 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 2 Dec 2016 16:41:27 -0800
Subject: [PATCH] undefine __va_arg_pack

dprintf() is also a libc function. This fixes
the compile errors

/usr/include/bits/stdio2.h:140:1: error: expected identifier or '(' before '{' token
|  {

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 zbar/debug.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/zbar/debug.h b/zbar/debug.h
index 482ca8d..68948f6 100644
--- a/zbar/debug.h
+++ b/zbar/debug.h
@@ -23,6 +23,7 @@
 
 /* varargs variations on compile time debug spew */
 
+#undef __va_arg_pack
 #ifndef DEBUG_LEVEL
 
 # ifdef __GNUC__
@@ -36,15 +37,14 @@
 #else
 
 # include <stdio.h>
-
 # ifdef __GNUC__
-#  define dprintf(level, args...) \
+#  define dprintf(level, format, args...) \
     if((level) <= DEBUG_LEVEL)    \
-        fprintf(stderr, args)
+        fprintf(stderr, format, args)
 # else
-#  define dprintf(level, ...)     \
+#  define dprintf(level, format, ...)     \
     if((level) <= DEBUG_LEVEL)    \
-        fprintf(stderr, __VA_ARGS__)
+        fprintf(stderr, format, __VA_ARGS__)
 # endif
 
 #endif /* DEBUG_LEVEL */
-- 
2.10.2

OpenPOWER on IntegriCloud