Skip to content

Commit a30c788

Browse files
authored
fix: adjust build flags for alpine (#8)
1 parent d21e854 commit a30c788

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ LUAJIT_DIR=/usr/local/openresty/luajit
99
XMLSEC_VER=1.2.28
1010

1111
CC=gcc
12-
CFLAGS=-g -fPIC -O2
12+
CFLAGS=-g -fPIC -O2 -fcommon
1313
XMLSEC1_CFLAGS=-D__XMLSEC_FUNCTION__=__func__ -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_GOST2012=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -Ixmlsec1-$(XMLSEC_VER)/include/ -I/usr/include/libxml2 -DXMLSEC_CRYPTO_OPENSSL=1
1414
CFLAGS_ALL=$(CFLAGS) -Wall -Werror -std=c99 $(XMLSEC1_CFLAGS)
1515
LIBFLAG=-shared
1616
LDFLAGS=-g -O2
1717
XMLSEC1_STATIC_LIBS=xmlsec1-$(XMLSEC_VER)/./src/openssl/.libs/libxmlsec1-openssl.a xmlsec1-$(XMLSEC_VER)/./src/.libs/libxmlsec1.a
18-
XMLSEC1_LDFLAGS=-lxml2 -lssl -lcrypto -ldl -Wl,--whole-archive $(XMLSEC1_STATIC_LIBS) -Wl,--no-whole-archive -lxslt
18+
XMLSEC1_LDFLAGS=-Wl,--whole-archive $(XMLSEC1_STATIC_LIBS) -Wl,--no-whole-archive -lxml2 -lssl -lcrypto -ldl -lxslt
1919
LDFLAGS_ALL=$(LIBFLAG) $(LDFLAGS) $(XMLSEC1_LDFLAGS)
2020

2121
.PHONY: build

lua/resty/saml.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ local function login_callback(self, opts)
330330
local state = args.RelayState
331331
if state ~= data.state then
332332
ngx.log(ngx.ERR, "state different: args.state=", state, ", state=", data.state)
333-
ngx.exit(HTTP_UNAUTHORIZED)
333+
ngx.exit(ngx.HTTP_UNAUTHORIZED)
334334
end
335335

336336
local issuer = saml.doc_issuer(doc)

0 commit comments

Comments
 (0)