summaryrefslogtreecommitdiff
path: root/security/lasso/patches
diff options
context:
space:
mode:
authorjoerg <joerg>2011-09-08 00:17:03 +0000
committerjoerg <joerg>2011-09-08 00:17:03 +0000
commit60477e777a0e4aa3a5727cfd9cc46b1df342c7d6 (patch)
tree10134e7c6b9e3dc67d41adb3bb5a0adda0cb1377 /security/lasso/patches
parent006cd894326f31966cc343fe1fae60f5bcaebb57 (diff)
downloadpkgsrc-60477e777a0e4aa3a5727cfd9cc46b1df342c7d6.tar.gz
Do not use nested functions. Add missing prototypes. Bump revision.
Diffstat (limited to 'security/lasso/patches')
-rw-r--r--security/lasso/patches/patch-lasso-id-ff-provider.c12
-rw-r--r--security/lasso/patches/patch-lasso-xml-tools.c43
2 files changed, 55 insertions, 0 deletions
diff --git a/security/lasso/patches/patch-lasso-id-ff-provider.c b/security/lasso/patches/patch-lasso-id-ff-provider.c
new file mode 100644
index 00000000000..45fdee6b57b
--- /dev/null
+++ b/security/lasso/patches/patch-lasso-id-ff-provider.c
@@ -0,0 +1,12 @@
+$NetBSD: patch-lasso-id-ff-provider.c,v 1.1 2011/09/08 00:17:03 joerg Exp $
+
+--- lasso/id-ff/provider.c.orig 2011-09-07 03:26:19.000000000 +0000
++++ lasso/id-ff/provider.c
+@@ -64,6 +64,7 @@ use this default role to access descript
+
+ #include "../saml-2.0/providerprivate.h"
+ #include <unistd.h>
++#include <string.h>
+ #include "../utils.h"
+ #include "../debug.h"
+
diff --git a/security/lasso/patches/patch-lasso-xml-tools.c b/security/lasso/patches/patch-lasso-xml-tools.c
new file mode 100644
index 00000000000..cf8b21f6894
--- /dev/null
+++ b/security/lasso/patches/patch-lasso-xml-tools.c
@@ -0,0 +1,43 @@
+$NetBSD: patch-lasso-xml-tools.c,v 1.1 2011/09/08 00:17:03 joerg Exp $
+
+--- lasso/xml/tools.c.orig 2011-09-07 03:18:42.000000000 +0000
++++ lasso/xml/tools.c
+@@ -27,6 +27,7 @@
+ /* permit importation of timegm for glibc2, wait for people to complain it does not work on their
+ * system. */
+ #define _BSD_SOURCE
++#define _NETBSD_SOURCE
+ #include "private.h"
+ #include <string.h>
+ #include <time.h>
+@@ -1196,6 +1197,11 @@ lasso_concat_url_query(const char *url,
+ *
+ * Return value: TRUE if no error occurred during evaluation, FALSE otherwise.
+ */
++static void
++structuredErrorFunc (void *userData, xmlErrorPtr error) {
++ *(int *)userData = error->code;
++}
++
+ gboolean
+ lasso_eval_xpath_expression(xmlXPathContextPtr xpath_ctx, const char *expression,
+ xmlXPathObjectPtr *xpath_object_ptr, int *xpath_error_code)
+@@ -1205,10 +1211,6 @@ lasso_eval_xpath_expression(xmlXPathCont
+ xmlStructuredErrorFunc oldStructuredErrorFunc;
+ gboolean rc = TRUE;
+
+- void structuredErrorFunc (G_GNUC_UNUSED void *userData, xmlErrorPtr error) {
+- errorCode = error->code;
+- }
+-
+ g_return_val_if_fail(xpath_ctx != NULL && expression != NULL, FALSE);
+
+ if (xpath_error_code) { /* reset */
+@@ -1216,6 +1218,7 @@ lasso_eval_xpath_expression(xmlXPathCont
+ }
+ oldStructuredErrorFunc = xpath_ctx->error;
+ xpath_ctx->error = structuredErrorFunc;
++ xpath_ctx->userData = &errorCode;
+ xpath_object = xmlXPathEvalExpression((xmlChar*)expression, xpath_ctx);
+ xpath_ctx->error = oldStructuredErrorFunc;
+