Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | Fix errors when building with sasl2 disabled |
| 2 | |
| 3 | Upstream-Status: Submitted [RPM5 maintainer] |
| 4 | |
| 5 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> |
| 6 | |
| 7 | Index: rpm/rpmio/mongoc.c |
| 8 | =================================================================== |
| 9 | --- rpm.orig/rpmio/mongoc.c |
| 10 | +++ rpm/rpmio/mongoc.c |
| 11 | @@ -39,8 +39,10 @@ |
| 12 | # include <winerror.h> |
| 13 | #endif |
| 14 | |
| 15 | +#ifdef HAVE_LIBSASL2 |
| 16 | #include <sasl/sasl.h> |
| 17 | #include <sasl/saslutil.h> |
| 18 | +#endif |
| 19 | |
| 20 | #include <openssl/bio.h> |
| 21 | #include <openssl/ssl.h> |
| 22 | @@ -14228,6 +14230,7 @@ mongoc_read_prefs_copy (const mongoc_rea |
| 23 | return ret; |
| 24 | } |
| 25 | |
| 26 | +#ifdef MONGOC_ENABLE_SASL |
| 27 | /*==============================================================*/ |
| 28 | /* --- mongoc-sasl.c */ |
| 29 | |
| 30 | @@ -14555,6 +14558,7 @@ _mongoc_sasl_step (mongoc_sasl_t *sasl, |
| 31 | |
| 32 | return true; |
| 33 | } |
| 34 | +#endif |
| 35 | |
| 36 | /*==============================================================*/ |
| 37 | /* --- mongoc-socket.c */ |
| 38 | Index: rpm/rpmio/mongoc.h |
| 39 | =================================================================== |
| 40 | --- rpm.orig/rpmio/mongoc.h |
| 41 | +++ rpm/rpmio/mongoc.h |
| 42 | @@ -38,8 +38,10 @@ |
| 43 | # include <sys/un.h> |
| 44 | #endif |
| 45 | |
| 46 | +#ifdef HAVE_LIBSASL2 |
| 47 | #include <sasl/sasl.h> |
| 48 | #include <sasl/saslutil.h> |
| 49 | +#endif |
| 50 | |
| 51 | #include <openssl/bio.h> |
| 52 | #include <openssl/ssl.h> |
| 53 | @@ -2455,6 +2457,8 @@ BSON_END_DECLS |
| 54 | /*==============================================================*/ |
| 55 | /* --- mongoc-sasl-private.h */ |
| 56 | |
| 57 | +#ifdef MONGOC_ENABLE_SASL |
| 58 | + |
| 59 | BSON_BEGIN_DECLS |
| 60 | |
| 61 | |
| 62 | @@ -2498,6 +2502,7 @@ bool _mongoc_sasl_step (mong |
| 63 | |
| 64 | |
| 65 | BSON_END_DECLS |
| 66 | +#endif |
| 67 | |
| 68 | /*==============================================================*/ |
| 69 | /* --- mongoc-ssl-private.h */ |