[IOT-2019] Add missing mutex include. 35/24235/5
authorMartin Roesch <martin.roesch@kistler.com>
Tue, 27 Feb 2018 12:31:07 +0000 (13:31 +0100)
committerC.J. Collier <cjcollier@linuxfoundation.org>
Tue, 6 Mar 2018 16:58:42 +0000 (16:58 +0000)
When compiling IoTivity with WITH_CLOUD=true WITH_MQ=PUB,SUB
the aircon_controlee example fails to compile:
In file included from cloud/samples/client/airconditioner/aircon_controlee.cpp:12:0:
resource/csdk/resource-directory/include/RDClient.h:49:21: error: 'recursive_mutex' is not a member of 'std'
     std::shared_ptr<std::recursive_mutex> _csdkLock;

Including the mutex header fixes the issue.

Change-Id: I1aa4a7fcc5b66ea05382dc3a821598abf5a91c0b
Signed-off-by: Martin Roesch <martin.roesch@kistler.com>
resource/csdk/resource-directory/include/RDClient.h

index 294da85..ac9a22a 100644 (file)
@@ -22,6 +22,7 @@
 #include "OCApi.h"
 #include "octypes.h"
 #include "rd_client.h"
+#include <mutex>
 
 typedef std::function<void(const OC::OCRepresentation&, const int)> PublishResourceCallback;
 typedef std::function<void(const int)> DeleteResourceCallback;