Skip to content

Commit

Permalink
net: sntp: add missing __cplusplus check
Browse files Browse the repository at this point in the history
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 17, 2019
1 parent 2809bdf commit a928b6d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/net/sntp.h
Expand Up @@ -10,6 +10,10 @@

#include <net/socket.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
* @brief Simple Network Time Protocol API
* @defgroup sntp SNTP
Expand Down Expand Up @@ -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

/**
* @}
*/
Expand Down

0 comments on commit a928b6d

Please sign in to comment.