Merge pull request #4453 from facchinm/crt_in_filesystem_mbed_os

mbed-os: allow storing certificates in filesystem
diff --git a/library/x509_crt.c b/library/x509_crt.c
index 7aefaa7..b4fe886 100644
--- a/library/x509_crt.c
+++ b/library/x509_crt.c
@@ -74,7 +74,11 @@
 #if !defined(_WIN32) || defined(EFIX64) || defined(EFI32)
 #include <sys/types.h>
 #include <sys/stat.h>
+#if defined(__MBED__)
+#include <platform/mbed_retarget.h>
+#else
 #include <dirent.h>
+#endif /* __MBED__ */
 #endif /* !_WIN32 || EFIX64 || EFI32 */
 #endif