weston_10.0_aglcore: Add helper iterator to loop over debug scopes
[AGL/meta-agl.git] / meta-agl-core / recipes-graphics / wayland / waltham / 0001-waltham-Fix-compile-build-error.patch
1 From cc87dddc2cdc0c20b053e3da1197efd671b4f50c Mon Sep 17 00:00:00 2001
2 From: Marius Vlad <marius.vlad@collabora.com>
3 Date: Wed, 23 Sep 2020 22:33:50 +0300
4 Subject: [PATCH 1/2] waltham: Fix compile build error
5
6 Newer compilers will complain about the fact debug_message is declared
7 multiple times:
8
9 multiple definition of `debug_message';
10 .libs/marshaller.o:/home/mvlad/src/native-agl-weston8/waltham/waltham/src/waltham/marshaller_log.h:35:
11 first defined here multiple definition of `debug_message';
12 .libs/marshaller.o:/home/mvlad/src/native-agl-weston8/waltham/waltham/src/waltham/marshaller_log.h:35:
13 first defined here /usr/bin/ld:
14 .libs/client-serialice.o:/home/mvlad/src/native-agl-weston8/waltham/waltham/src/waltham/marshaller_log.h:35:
15 multiple definition of `debug_message';
16 .libs/marshaller.o:/home/mvlad/src/native-agl-weston8/waltham/waltham/src/waltham/marshaller_log.h:35:
17 first defined here
18
19 Bug-AGL: SPEC-3649
20
21 Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
22 ---
23  src/waltham/marshaller_log.h | 2 +-
24  src/waltham/waltham-util.c   | 2 +-
25  2 files changed, 2 insertions(+), 2 deletions(-)
26
27 diff --git a/src/waltham/marshaller_log.h b/src/waltham/marshaller_log.h
28 index 8254914..ffa87c1 100644
29 --- a/src/waltham/marshaller_log.h
30 +++ b/src/waltham/marshaller_log.h
31 @@ -32,7 +32,7 @@
32  /* Comment/uncomment to disable/enable debugging log */
33  #define DEBUG
34  //#define PROFILE
35 -int debug_message;
36 +extern int debug_message;
37  
38  #ifdef DEBUG
39  static inline void DEBUG_STAMP (void) {
40 diff --git a/src/waltham/waltham-util.c b/src/waltham/waltham-util.c
41 index 410b114..8f898f8 100644
42 --- a/src/waltham/waltham-util.c
43 +++ b/src/waltham/waltham-util.c
44 @@ -34,7 +34,7 @@
45  #include "waltham-connection.h"
46  #include "waltham-private.h"
47  
48 -int debug_message;
49 +extern int debug_message;
50  
51  static void
52  wth_pfx_print(const char *pfx, const char *fmt, va_list argp)
53 -- 
54 2.28.0
55