Skip to content

Commit e68b491

Browse files
committed
Fixed compilation error with xmlsec > 1.2.20 #46
1 parent d1bb124 commit e68b491

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/constants.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,9 @@ int PyXmlSec_ConstantsModule_Init(PyObject* package) {
284284
PYXMLSEC_ADD_NS_CONSTANT(Ns, "BASE");
285285
PYXMLSEC_ADD_NS_CONSTANT(DSigNs, "DS");
286286
PYXMLSEC_ADD_NS_CONSTANT(EncNs, "ENC");
287+
#ifndef XMLSEC_NO_XKMS
287288
PYXMLSEC_ADD_NS_CONSTANT(XkmsNs, "XKMS");
289+
#endif
288290
PYXMLSEC_ADD_NS_CONSTANT(XPathNs, "XPATH");
289291
PYXMLSEC_ADD_NS_CONSTANT(XPath2Ns, "XPATH2");
290292
PYXMLSEC_ADD_NS_CONSTANT(XPointerNs, "XPOINTER");

src/platform.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@
2121

2222
#define XMLSEC_VERSION_HEX ((XMLSEC_VERSION_MAJOR << 8) | (XMLSEC_VERSION_MINOR << 4) | (XMLSEC_VERSION_SUBMINOR))
2323

24+
// XKMS support was removed in version 1.2.21
25+
// https://mail.gnome.org/archives/commits-list/2015-February/msg10555.html
26+
#if XMLSEC_VERSION_HEX > 0x134
27+
#define XMLSEC_NO_XKMS 1
28+
#endif
29+
2430
#define XSTR(c) (const xmlChar*)(c)
2531

2632
#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)

0 commit comments

Comments
 (0)