From 28d79e242f82ba1649dee170f0a4e5ff17f9b353 Mon Sep 17 00:00:00 2001 From: Kerry Jones Date: Fri, 28 Jun 2019 08:19:11 +0200 Subject: [PATCH] lwip/sntp: Added extern "C" so that sntp_set_time_sync_notification_cb can be used from c++ Signed-off-by: Konstantin Kondrashov Merges: https://github.com/espressif/esp-idf/pull/3700 --- components/lwip/include/apps/sntp/sntp.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/components/lwip/include/apps/sntp/sntp.h b/components/lwip/include/apps/sntp/sntp.h index 418d3c70ed..a94981b5d9 100644 --- a/components/lwip/include/apps/sntp/sntp.h +++ b/components/lwip/include/apps/sntp/sntp.h @@ -15,6 +15,10 @@ #ifndef __SNTP_H__ #define __SNTP_H__ +#ifdef __cplusplus +extern "C" { +#endif + /* * The time update takes place in the sntp_sync_time() function. * The user has the ability to redefine this function in order @@ -116,4 +120,8 @@ void sntp_set_sync_status(sntp_sync_status_t sync_status); */ void sntp_set_time_sync_notification_cb(sntp_sync_time_cb_t callback); +#ifdef __cplusplus +} +#endif + #endif // __SNTP_H__