Skip to content

Commit

Permalink
Merge pull request #2314 from jfm92/master
Browse files Browse the repository at this point in the history
Adding extern C to definitions to allow link on C++ project
  • Loading branch information
hathach committed Nov 13, 2023
2 parents f84eafc + d4be0fd commit a6b29ae
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/networking/dhserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,13 @@ typedef struct dhcp_config
dhcp_entry_t *entries;
} dhcp_config_t;

#ifdef __cplusplus
extern "C" {
#endif
err_t dhserv_init(const dhcp_config_t *config);
void dhserv_free(void);
#ifdef __cplusplus
}
#endif

#endif /* DHSERVER_H */
6 changes: 6 additions & 0 deletions lib/networking/dnserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@

typedef bool (*dns_query_proc_t)(const char *name, ip4_addr_t *addr);

#ifdef __cplusplus
extern "C" {
#endif
err_t dnserv_init(const ip_addr_t *bind, uint16_t port, dns_query_proc_t query_proc);
void dnserv_free(void);
#ifdef __cplusplus
}
#endif

#endif

0 comments on commit a6b29ae

Please sign in to comment.