Merge pull request #140 from hussainnaqvee/patch-1
[awesomized/libmemcached] / src / libmemcached / sasl.cc
index 4fa981d285cf6a03c047d1acd1ebbaa391e49932..90f663a1262453deb530dfa4a4637b2d9b900371 100644 (file)
@@ -1,6 +1,6 @@
 /*
     +--------------------------------------------------------------------+
-    | libmemcached - C/C++ Client Library for memcached                  |
+    | libmemcached-awesome - C/C++ Client Library for memcached          |
     +--------------------------------------------------------------------+
     | Redistribution and use in source and binary forms, with or without |
     | modification, are permitted under the terms of the BSD license.    |
@@ -9,12 +9,11 @@
     | the terms online at: https://opensource.org/licenses/BSD-3-Clause  |
     +--------------------------------------------------------------------+
     | Copyright (c) 2006-2014 Brian Aker   https://datadifferential.com/ |
-    | Copyright (c) 2020 Michael Wallner   <mike@php.net>                |
+    | Copyright (c) 2020-2021 Michael Wallner        https://awesome.co/ |
     +--------------------------------------------------------------------+
 */
 
 #include "libmemcached/common.h"
-#include "p9y/socket.hpp"
 
 #include <cassert>
 #include <atomic>
@@ -93,7 +92,11 @@ static memcached_return_t resolve_names(memcached_instance_st &server, char *lad
 extern "C" {
 
 static void sasl_shutdown_function() {
+#if HAVE_SASL_CLIENT_DONE
+  (void) sasl_client_done();
+#else
   sasl_done();
+#endif
 }
 
 static std::atomic<int> sasl_startup_state(SASL_OK);