Commit aa225f74 authored by Olaf Bergmann's avatar Olaf Bergmann

dcaf_coap.h: fix coap.h include path for ESP-IDF

Under ESP-IDF [1], coap.h resides in port/include/coap and therefore
is not found by the #include <coap2/coap.h>. This adds a pre-processor
conditional to #include <coap.h> if ESP_PLATFORM is defined.

parent 5743f52d
* dcaf_coap.h -- CoAP compatibility wrapper libdcaf
* Copyright (C) 2018 Olaf Bergmann <>
* Copyright (C) 2018-2020 Olaf Bergmann <>
* This file is part of the DCAF library libdcaf. Please see README
* for terms of use.
......@@ -10,7 +10,17 @@
#ifndef _DCAF_COAP_H_
#define _DCAF_COAP_H_ 1
* The auto-generated file coap.h usually resides in the coap2 include
* path. As the ESP-IDF does not generate the file and comes with a
* custom coap.h that lives in port/coap we need to change the include
* path accordingly.
#include <coap.h>
#else /* !ESP_PLATFORM */
#include <coap2/coap.h>
#endif /* !ESP_PLATFORM */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment