[Spice-devel] [PATCH] Fix --without-sasl build

Christophe Fergeau cfergeau at redhat.com
Wed Mar 19 08:31:16 PDT 2014


There are 2 SASL-related function prototypes which are unused in the
--without-sasl case. They cause a warning, and a build failure
when using -Werror. Wrapping them in #if HAVE_SASL avoids this issue.
---
 server/reds_stream.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/server/reds_stream.c b/server/reds_stream.c
index 0b06771..4dd08a9 100644
--- a/server/reds_stream.c
+++ b/server/reds_stream.c
@@ -172,7 +172,9 @@ void reds_stream_remove_watch(RedsStream* s)
     }
 }
 
+#if HAVE_SASL
 static ssize_t reds_stream_sasl_read(RedsStream *s, uint8_t *buf, size_t nbyte);
+#endif
 
 ssize_t reds_stream_read(RedsStream *s, void *buf, size_t nbyte)
 {
@@ -206,7 +208,9 @@ bool reds_stream_write_all(RedsStream *stream, const void *in_buf, size_t n)
     return TRUE;
 }
 
+#if HAVE_SASL
 static ssize_t reds_stream_sasl_write(RedsStream *s, const void *buf, size_t nbyte);
+#endif
 
 ssize_t reds_stream_write(RedsStream *s, const void *buf, size_t nbyte)
 {
-- 
1.8.5.3



More information about the Spice-devel mailing list