mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-23 07:35:13 +03:00
Zephyr: Support C++ builds
Some of the Zephyr include files need to be C++, not C based. The 'extern "C"' wrapper in include/coap3/coap.h means that all #include are treated as being C. Remove 'extern "C"' wrapper from include/coap3/coap.h and add wrapper to include files after #include and before any function / structure definitions. Add in a C++ build test for CI.
This commit is contained in:
1 parent
7dff177f29
commit
ea01661faf
68 files changed
+582
-29
No files matched your search
@@ -25,6 +25,10 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_FLS
|
||||
/* include this only if fls() is not available */
|
||||
extern int coap_fls(unsigned int i);
|
||||
@@ -124,4 +128,8 @@ coap_encode_var_bytes(uint8_t *buf, unsigned int value) {
|
||||
return (int)coap_encode_var_safe(buf, sizeof(value), value);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* COAP_ENCODE_H_ */
|
||||
Reference in new issue
Block a user