summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2009-06-18 21:55:50 +0000
committerStef Walter <stef@memberwebs.com>2009-06-18 21:55:50 +0000
commit86c2a744f1feba57c107a0a985f3026f2f3817a5 (patch)
tree1ccbd72bac8f77dd080993428c936d20f1cfd4fd
parent7976a44058b218f9729f96115886d49de2c49a5f (diff)
FreeBSD compile fixes
-rw-r--r--module/Makefile.am4
-rw-r--r--module/consumer.cc4
-rw-r--r--module/mod_auth_singleid.c2
-rw-r--r--module/mod_auth_singleid.h1
4 files changed, 7 insertions, 4 deletions
diff --git a/module/Makefile.am b/module/Makefile.am
index cb4d829..60cfa87 100644
--- a/module/Makefile.am
+++ b/module/Makefile.am
@@ -4,6 +4,8 @@ noinst_DATA = mod_auth_singleid.la
INCLUDES = -I../ -g -O0 ${APACHE_CFLAGS} ${OPKELE_CFLAGS}
AM_LDFLAGS = ${OPKELE_LIBS}
+.SUFFIXES = ${.SUFFIXES} .la
+
libmodauthsingleid_la_SOURCES = \
mod_auth_singleid.c \
mod_auth_singleid.h \
@@ -14,4 +16,4 @@ install-exec-local:
@APXS@ -i -a -n 'auth_singleid' mod_auth_singleid.la
mod_auth_singleid.la: libmodauthsingleid.la
- ${APXS} -c -o $@ $< ${APACHE_CFLAGS} ${OPKELE_CFLAGS} ${OPKELE_LIBS}
+ @APXS@ -c -o $@ $< ${APACHE_CFLAGS} ${OPKELE_CFLAGS} ${OPKELE_LIBS}
diff --git a/module/consumer.cc b/module/consumer.cc
index 1016f84..49620db 100644
--- a/module/consumer.cc
+++ b/module/consumer.cc
@@ -110,7 +110,7 @@ Consumer::store_assoc(const string& server, const string& handle,
data.server = server.c_str();
data.handle = handle.c_str();
data.type = type.c_str();
- data.secret = secret.data();
+ data.secret = &(secret.front());
data.n_secret = secret.size();
data.expires = expires_in;
@@ -313,7 +313,7 @@ cancelled_auth (sid_request_t *req, Consumer &consumer, params_t &params)
sid_request_respond (req, 401, "Authentication Required", NULL);
}
-void
+extern "C" void
sid_consumer_authenticate(sid_request_t *req, sid_storage_t *store,
const char *trust_root, const char *identity)
{
diff --git a/module/mod_auth_singleid.c b/module/mod_auth_singleid.c
index 4ee7421..2e46586 100644
--- a/module/mod_auth_singleid.c
+++ b/module/mod_auth_singleid.c
@@ -505,7 +505,7 @@ session_send_info (sid_context_t *ctx, request_rec *r, sid_session_t *sess)
char *cookie, *sig, *value;
/* Create the cookie value and sign it */
- value = apr_psprintf (r->pool, "1 %ld \"%s\"", sess->expiry, ap_escape_quotes (r->pool, sess->identifier));
+ value = apr_psprintf (r->pool, "1 %ld \"%s\"", (long)sess->expiry, ap_escape_quotes (r->pool, sess->identifier));
sig = session_create_sig (r->pool, value);
/* Build up the full cookie spec */
diff --git a/module/mod_auth_singleid.h b/module/mod_auth_singleid.h
index 038e23e..17e1f22 100644
--- a/module/mod_auth_singleid.h
+++ b/module/mod_auth_singleid.h
@@ -2,6 +2,7 @@
#define MOD_AUTH_SINGLEID_H_
#include <stdlib.h>
+#include <time.h>
#ifdef __cplusplus
extern "C" {