Skip to content

Commit 7a65336

Browse files
Andrew Kontrakartben
authored andcommitted
net: C++ support for mdns_responder.h
mdns_responder.h did not include header guards for C++, causing it to fail if used in a C++ file. This change adds the header guards. Tested using samples/cpp/hello_world, with an added call to mdns_responder_set_ext_records(). Signed-off-by: Andrew Kontra <[email protected]>
1 parent d36c0be commit 7a65336

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

include/zephyr/net/mdns_responder.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
#include <stddef.h>
1818
#include <zephyr/net/dns_sd.h>
1919

20+
#ifdef __cplusplus
21+
extern "C" {
22+
#endif
23+
2024
/**
2125
* @brief Register continuous memory of @ref dns_sd_rec records.
2226
*
@@ -31,4 +35,8 @@
3135
*/
3236
int mdns_responder_set_ext_records(const struct dns_sd_rec *records, size_t count);
3337

38+
#ifdef __cplusplus
39+
}
40+
#endif
41+
3442
#endif /* ZEPHYR_INCLUDE_NET_MDNS_RESPONDER_H_ */

0 commit comments

Comments
 (0)