summarylogtreecommitdiffstats
path: root/f484c603a81c3bddd3f0160cfdbe231b8a453cde.diff
blob: e64883c652e3856a77b129c3ef381131549a8e17 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
diff --git a/dev/Gemfile b/dev/Gemfile
index 567848b5..55292781 100644
--- a/dev/Gemfile
+++ b/dev/Gemfile
@@ -41,4 +41,4 @@ gem 'minitest-reporters'
 
 gem 'fpm', :git => "https://github.com/slact/fpm.git"
 
-gem 'hsss'
+gem 'hsss', "~> 0.1.20"
diff --git a/dev/rebuild.sh b/dev/rebuild.sh
index ab443f54..49bc5be9 100755
--- a/dev/rebuild.sh
+++ b/dev/rebuild.sh
@@ -244,6 +244,7 @@ if [[ -z $NO_MAKE ]]; then
   bundle exec hsss \
      --format whole \
      --header-only \
+     --header-guard NCHAN_REDIS_LUA_SCRIPTS_H \
      --no-static \
      ${rdstore_dir}/redis-lua-scripts/*.lua > ${rdstore_dir}/redis_lua_commands.h
   if ! [ $? -eq 0 ]; then;
diff --git a/src/store/memory/memstore.c b/src/store/memory/memstore.c
index 2844220c..f0f78acc 100755
--- a/src/store/memory/memstore.c
+++ b/src/store/memory/memstore.c
@@ -40,6 +40,8 @@ static ngx_int_t redis_fakesub_timer_interval;
 
 #endif
 
+uint16_t  memstore_worker_generation;
+
 
 typedef struct {
   //memstore_channel_head_t       unbuffered_dummy_chanhead;
diff --git a/src/store/memory/store-private.h b/src/store/memory/store-private.h
index e4a426a3..49de940b 100644
--- a/src/store/memory/store-private.h
+++ b/src/store/memory/store-private.h
@@ -172,6 +172,6 @@ ngx_int_t chanhead_gc_withdraw(memstore_channel_head_t *chanhead, const char *);
 void memstore_chanhead_release(memstore_channel_head_t *ch, char *label);
 void memstore_chanhead_reserve(memstore_channel_head_t *ch, const char *label);
 
-uint16_t  memstore_worker_generation; //times nginx has been restarted + 1
+extern uint16_t  memstore_worker_generation; //times nginx has been restarted + 1
 
 #endif /*MEMSTORE_PRIVATE_HEADER*/
diff --git a/src/store/redis/redis_lua_commands.h b/src/store/redis/redis_lua_commands.h
index 76fb7b95..2efb25bd 100644
--- a/src/store/redis/redis_lua_commands.h
+++ b/src/store/redis/redis_lua_commands.h
@@ -1,3 +1,5 @@
+#ifndef NCHAN_REDIS_LUA_SCRIPTS_H
+#define NCHAN_REDIS_LUA_SCRIPTS_H
 // don't edit this please, it was auto-generated by hsss
 // https://github.com/slact/hsss
 
@@ -63,7 +65,8 @@ typedef struct {
   redis_lua_script_t subscriber_unregister;
 
 } redis_lua_scripts_t;
-redis_lua_scripts_t redis_lua_scripts;
-const int redis_lua_scripts_count;
+extern redis_lua_scripts_t redis_lua_scripts;
+extern const int redis_lua_scripts_count;
 #define REDIS_LUA_SCRIPTS_EACH(script) \
 for((script)=(redis_lua_script_t *)&redis_lua_scripts; (script) < (redis_lua_script_t *)(&redis_lua_scripts + 1); (script)++) 
+#endif //NCHAN_REDIS_LUA_SCRIPTS_H