1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-15 01:23:49 +01:00

Merge pull request #21193 from maribu/sys/net/nanocoap/drop-type-hack-v2

sys/net/nanocoap: drop typedef hack [v2]
This commit is contained in:
Marian Buschsieweke 2025-02-05 15:58:12 +00:00 committed by GitHub
commit c20ce69967
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 12 deletions

View File

@ -85,24 +85,14 @@
#include <string.h>
#include <unistd.h>
#ifdef RIOT_VERSION
#include "bitarithm.h"
#include "bitfield.h"
#include "byteorder.h"
#include "iolist.h"
#include "macros/utils.h"
#include "net/coap.h"
#include "modules.h"
#else
#include "coap.h"
#include <arpa/inet.h>
#endif
#if defined(MODULE_SOCK_UDP) || defined(DOXYGEN)
#include "net/coap.h"
#include "net/sock/udp.h"
#else
typedef void sock_udp_ep_t;
#endif
#if defined(MODULE_NANOCOAP_RESOURCES)
#include "xfa.h"

View File

@ -25,7 +25,9 @@
#ifndef SUIT_TRANSPORT_WORKER_H
#define SUIT_TRANSPORT_WORKER_H
#include "net/nanocoap.h"
#if MODULE_NANOCOAP
# include "net/nanocoap.h"
#endif
#ifdef __cplusplus
extern "C" {

View File

@ -61,3 +61,9 @@ ifeq (, $(UNIT_TESTS))
else
CFLAGS += -DTEST_SUITES='$(subst $() $(),$(comma),$(UNIT_TESTS:tests-%=%))'
endif
# Hack: If GNRC is not used, still provide access to sock_types.h to allow
# building nanocoap
ifeq (,$(filter gnrc_sock,$(USEMODULE)))
CFLAGS +=-I$(RIOTBASE)/sys/net/gnrc/sock/include
endif