summaryrefslogtreecommitdiff
path: root/dev-build/b2/files/b2-4.9.2-odr.patch
blob: 62cbca1896400362b5af0682d1b425e343493b81 (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
52
53
54
Avoid ODR violations by giving "_stack" internal linkage
https://bugs.gentoo.org/858320

--- a/engine/function.cpp
+++ b/engine/function.cpp
@@ -213,11 +213,11 @@
 } JAM_FUNCTION;
 
 
+namespace
+{
 typedef struct _stack STACK;
 typedef STACK* stack_ptr;
 
-namespace
-{
     template <typename T>
     using remove_cref_t
         = typename std::remove_const<
@@ -260,7 +260,6 @@
         typename select_last_impl<(sizeof...(A) == 1), type_list<A...> >
             ::template type<A...>;
     #endif
-}
 
 struct _stack
 {
@@ -439,6 +438,8 @@
     cleanups_size += n;
 }
 
+}
+
 static STACK * stack_global()
 {
     static _stack singleton;
--- a/engine/make1.cpp
+++ b/engine/make1.cpp
@@ -86,6 +86,7 @@
 #define T_STATE_MAKE1B  1  /* make1b() should be called */
 #define T_STATE_MAKE1C  2  /* make1c() should be called */
 
+namespace {
 typedef struct _state state;
 struct _state
 {
@@ -94,6 +95,7 @@
     TARGET * parent;    /* parent argument necessary for MAKE1A */
     int32_t  curstate;  /* current state */
 };
+}
 
 static void make1a( state * const );
 static void make1b( state * const );