Skip to content

Commit

Permalink
coap_net.h: add ifdef WITH_LWIP around lwip functions
Browse files Browse the repository at this point in the history
  • Loading branch information
anyc authored and mrdeep1 committed Aug 27, 2024
1 parent a705e04 commit 1c97907
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion doc/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -2210,7 +2210,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

PREDEFINED = @PREDEFINED_CFLAGS@
PREDEFINED = @PREDEFINED_CFLAGS@ __DOXYGEN__

# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
Expand Down
2 changes: 2 additions & 0 deletions include/coap3/coap_net.h
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,7 @@ COAP_API void coap_io_do_epoll(coap_context_t *ctx, struct epoll_event *events,

/**@}*/

#if defined(WITH_LWIP) || defined(WITH_LWIP_MAN_CHECK) || defined(__DOXYGEN__)
/**
* @ingroup application_api
* @defgroup lwip LwIP specific API
Expand Down Expand Up @@ -848,6 +849,7 @@ void coap_lwip_set_input_wait_handler(coap_context_t *context,
void *input_arg);

/**@}*/
#endif /* WITH_LWIP || WITH_LWIP_MAN_CHECK || defined(__DOXYGEN__) */

/**
* @deprecated Use coap_io_process() instead.
Expand Down
3 changes: 3 additions & 0 deletions man/examples-code-check.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ check_synopsis(const char *file) {
exit_code = 1;
return;
}
if (!strcmp(file, "coap_lwip.txt.in")) {
fprintf(fpcode, "#define WITH_LWIP_MAN_CHECK\n");
}
fprintf(fpcode, "#include <coap3/coap.h>\n");
fprintf(fpcode, "#ifdef __GNUC__\n");
fprintf(fpcode, "#define U __attribute__ ((unused))\n");
Expand Down

0 comments on commit 1c97907

Please sign in to comment.