summaryrefslogtreecommitdiff
path: root/textproc/p5-XML-LibXML-XPathContext/files/extrapatch-XPathContext.xs
diff options
context:
space:
mode:
Diffstat (limited to 'textproc/p5-XML-LibXML-XPathContext/files/extrapatch-XPathContext.xs')
-rw-r--r--textproc/p5-XML-LibXML-XPathContext/files/extrapatch-XPathContext.xs18
1 files changed, 18 insertions, 0 deletions
diff --git a/textproc/p5-XML-LibXML-XPathContext/files/extrapatch-XPathContext.xs b/textproc/p5-XML-LibXML-XPathContext/files/extrapatch-XPathContext.xs
new file mode 100644
index 000000000000..c7c70048dec1
--- /dev/null
+++ b/textproc/p5-XML-LibXML-XPathContext/files/extrapatch-XPathContext.xs
@@ -0,0 +1,18 @@
+--- XPathContext.xs.orig Mon Jan 16 11:27:29 2006
++++ XPathContext.xs Mon Jan 16 11:28:54 2006
+@@ -11,6 +11,15 @@
+ #include "XSUB.h"
+ #include "ppport.h"
+
++/* try to be compatible with older perls */
++/* SvPV_nolen() macro first defined in 5.005_55 */
++/* this is slow, not threadsafe, but works */
++#include "patchlevel.h"
++#if (PATCHLEVEL == 4) || ((PATCHLEVEL == 5) && (SUBVERSION < 55))
++static STRLEN nolen_na;
++# define SvPV_nolen(sv) SvPV ((sv), nolen_na)
++#endif
++
+ /* libxml2 stuff */
+ #include <libxml/xpath.h>
+ #include <libxml/xpathInternals.h>