File: dynamic-module.patch

package info (click to toggle)
libnginx-mod-http-upstream-fair 1%3A0.0~git20120408.a18b409-6
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 228 kB
  • sloc: ansic: 2,972; sh: 53; makefile: 3
file content (29 lines) | stat: -rw-r--r-- 1,044 bytes parent folder | download | duplicates (6)
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
From 725c58638f5d1921ad5d4a39274edb81bc5b47e6 Mon Sep 17 00:00:00 2001
From: 99999 <PeterTonoli@users.noreply.github.com>
Date: Sat, 30 Apr 2016 23:56:19 +1000
Subject: [PATCH] nginx-upstream-fair can now be compiled as a dynamic module
Origin: other, https://github.com/gnosek/nginx-upstream-fair/pull/21

---
 config | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/config b/config
index ff351b7..d8d478b 100644
--- a/config
+++ b/config
@@ -1,3 +1,12 @@
 ngx_addon_name=ngx_http_upstream_fair_module
-HTTP_MODULES="$HTTP_MODULES ngx_http_upstream_fair_module"
-NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_upstream_fair_module.c"
+
+if test -n "$ngx_module_link"; then
+    ngx_module_type=HTTP
+    ngx_module_name=ngx_http_upstream_fair_module
+    ngx_module_srcs="$ngx_addon_dir/ngx_http_upstream_fair_module.c"
+
+    . auto/module
+else
+    HTTP_MODULES="$HTTP_MODULES ngx_http_upstream_fair_module"
+    NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_upstream_fair_module.c"
+fi