eio: fix correct stat structure on Windows 32 bits

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
Vincent Torri 2017-08-14 15:50:03 +02:00 committed by Cedric BAIL
parent d0469d52ed
commit 45bcc87e76
2 changed files with 11 additions and 5 deletions

View File

@ -56,13 +56,19 @@
#include "Eio.h"
#ifdef _WIN32
# ifdef _WIN64
typedef struct __stat64 _eio_stat_t;
#define _eio_stat(p, b) _stat64(p, b)
#define _eio_lstat(p, b) _stat64(p, b)
# define _eio_stat(p, b) _stat64(p, b)
# define _eio_lstat(p, b) _stat64(p, b)
# else
typedef struct _stat _eio_stat_t;
# define _eio_stat(p, b) _stat(p, b)
# define _eio_lstat(p, b) _stat(p, b)
# endif
#else
typedef struct stat _eio_stat_t;
#define _eio_stat(p, b) stat(p, b)
#define _eio_lstat(p, b) lstat(p, b)
# define _eio_stat(p, b) stat(p, b)
# define _eio_lstat(p, b) lstat(p, b)
# include <grp.h>
# include <pwd.h>

View File

@ -155,7 +155,7 @@ static void
_eio_file_lstat(void *data, Ecore_Thread *thread)
{
Eio_File_Stat *s = data;
struct stat buf;
_eio_stat_t buf;
if (_eio_lstat(s->path, &buf) != 0)
eio_file_thread_error(&s->common, thread);