Skip to content
Permalink
Browse files

net: sntp: add missing __cplusplus check

This patch adds an `extern "C"` linkage directive so sntp.h can be
included by C++ source files.

Signed-off-by: Markus Fuchs <markus.fuchs@de.sauter-bc.com>
  • Loading branch information...
mrfuchs authored and ioannisg committed Jul 16, 2019
1 parent 2809bdf commit a928b6dc619818aaeb08cf01fa5bc4b4a6e25f3b
Showing with 8 additions and 0 deletions.
  1. +8 −0 include/net/sntp.h
@@ -10,6 +10,10 @@

#include <net/socket.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
* @brief Simple Network Time Protocol API
* @defgroup sntp SNTP
@@ -98,6 +102,10 @@ void sntp_close(struct sntp_ctx *ctx);
int sntp_simple(const char *server, u32_t timeout,
struct sntp_time *time);

#ifdef __cplusplus
}
#endif

/**
* @}
*/

0 comments on commit a928b6d

Please sign in to comment.
You can’t perform that action at this time.