I would like to use the cURL libary that is included in the nRF Connect SDK (v2.6.1) a nrf/ext/curl
I started with the download sample (nrf/samples/net/download)
I've added this to CMakeLists.txt
# CMakeLists.txt # ... target_include_directories(app PRIVATE C:/ncs/v2.6.1/nrf/ext/curl/include/) # ...
And I've added this to the top of src.main.c:
// src/main.c // ... #include <string.h> #include <stdlib.h> #include <zephyr/kernel.h> #include <zephyr/net/socket.h> #include <zephyr/net/net_if.h> #include <zephyr/net/conn_mgr_connectivity.h> #include <net/download_client.h> #include <curl/curl.h> // ...
When I build, I get the following error:
In file included from C:/ncs/v2.6.1/nrf/ext/curl/include/curl/curl.h:38,
from C:/Users/MarkBlackburn/Documents/git/nrf9160_samples/curl_test/src/main.c:15:
C:/ncs/v2.6.1/nrf/ext/curl/include/curl/system.h:436:12: fatal error: sys/socket.h: No such file or directory
436 | # include <sys/socket.h>
How do I get the sys/socket.h file included in the project?