diff options
author | Felipe Magno de Almeida <felipe@expertise.dev> | 2020-05-04 23:21:03 -0300 |
---|---|---|
committer | Felipe Magno de Almeida <felipe@expertise.dev> | 2020-12-15 16:10:26 -0300 |
commit | 7799e189537b93976bdde7b06ff8d90c73b9bd54 (patch) | |
tree | 861bbc9ef7350eaf6b97a3b9daeee2179d7bac8e | |
parent | 6237e6f9bf44b4b989a928bc8f3fbcf341f58a42 (diff) | |
download | efl-7799e189537b93976bdde7b06ff8d90c73b9bd54.tar.gz |
windows: Do not use S_ISREG in windows platform
-rw-r--r-- | src/lib/eina/eina_module.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/eina/eina_module.c b/src/lib/eina/eina_module.c index 15a81f27fc..35adeaabb8 100644 --- a/src/lib/eina/eina_module.c +++ b/src/lib/eina/eina_module.c @@ -258,7 +258,12 @@ EINA_API Eina_Module *eina_module_new(const char *file) (file[0] != '\0' && file[1] == ':' && file[2] == '\\')) { if (stat(file, &st) == -1) return NULL; +#ifdef _MSC_VER +#define EINA_S_ISREG(m) (((m) & S_IFMT) == S_IFREG) + if (!EINA_S_ISREG(st.st_mode)) return NULL; +#else if (!S_ISREG(st.st_mode)) return NULL; +#endif } len = strlen(file); |