diff --git a/src/MQTTAsync.h b/src/MQTTAsync.h index e11af048..ad715627 100644 --- a/src/MQTTAsync.h +++ b/src/MQTTAsync.h @@ -507,6 +507,8 @@ typedef int MQTTAsync_updateConnectOptions(void* context, MQTTAsync_connectData* */ LIBMQTT_API int MQTTAsync_setUpdateConnectOptions(MQTTAsync handle, void* context, MQTTAsync_updateConnectOptions* co); +#if !defined(NO_PERSISTENCE) + /** * Sets the MQTTPersistence_beforeWrite() callback function for a client. * @param handle A valid client handle from a successful call to MQTTAsync_create(). @@ -530,6 +532,7 @@ LIBMQTT_API int MQTTAsync_setBeforePersistenceWrite(MQTTAsync handle, void* cont */ LIBMQTT_API int MQTTAsync_setAfterPersistenceRead(MQTTAsync handle, void* context, MQTTPersistence_afterRead* co); +#endif /** The data returned on completion of an unsuccessful API call in the response callback onFailure. */ typedef struct