Hi,
When trying to compile memcached 1.4.7 with sasl support enabled and
using cyrus sasl 2.1.25, I get the following build error:
cc -std=gnu99 -DHAVE_CONFIG_H -I. -I/usr/local/include -O2 -pipe -
fstack-protector -I/usr/local/include -fno-strict-aliasing -fprofile-
arcs -ftest-coverage -O2 -pipe -fstack-protector -I/usr/local/include -
fno-strict-aliasing -pthread -Wall -Werror -pedantic -Wmissing-
prototypes -Wmissing-declarations -Wredundant-decls -MT
memcached_debug-sasl_defs.o -MD -MP -MF .deps/memcached_debug-
sasl_defs.Tpo -c -o memcached_debug-sasl_defs.o `test -f 'sasl_defs.c'
|| echo './'`sasl_defs.c
cc1: warnings being treated as errors
sasl_defs.c:144: warning: initialization from incompatible pointer
type
*** Error code 1
I came up with this patch to fix it:
--- sasl_defs.c.orig 2011-10-01 18:09:22.000000000 +0000
+++ sasl_defs.c 2011-10-01 18:10:33.000000000 +0000
@@ -3,6 +3,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sasl/saslplug.h>
#ifdef HAVE_SASL_CB_GETCONF
/* The locations we may search for a SASL config file if the user
didn't
@@ -141,7 +142,7 @@
{ SASL_CB_SERVER_USERDB_CHECKPASS, sasl_server_userdb_checkpass,
NULL },
#endif
- { SASL_CB_LOG, sasl_log, NULL },
+ { SASL_CB_LOG, (sasl_callback_ft)sasl_log, NULL },
#ifdef HAVE_SASL_CB_GETCONF
{ SASL_CB_GETCONF, sasl_getconf, NULL },
Has anyone else seen this issue? Is the patch correct?
Thanks,
Steve