error: #error "<dirent.h> not supported"

Hi there.

I am compiling the Nordic MQTT subscriber example (using TLS), and see the following error:

c:\program files (x86)\gnu tools arm embedded\5.4 2016q2\arm-none-eabi\include\sys\dirent.h:10:2: error: #error "<dirent.h> not supported" #error "<dirent.h> not supported"

C:/nello_firmware/nrf5_iot_sdk_3288530/external/mbedtls/library/x509_crt.c: In function 'mbedtls_x509_crt_parse_path': C:/nello_firmware/nrf5_iot_sdk_3288530/external/mbedtls/library/x509_crt.c:1158:5: error: unknown type name 'DIR'

The error comes from the arm-none-eabi\include\sys\dirent.h.

After searching, I find one thread which says I should find the relavant header file on the target system. I am working on nrf52832 with both nRF5_SDK and nrf5_iot_sdk. If the thread is correct, where should I find the header file?

I am looking forward to any help, thanks.