fixed some build problems on mac os x 10.1

This commit is contained in:
2015-04-26 16:20:21 +00:00
parent f9b3428a21
commit 0a8e84add2
9 changed files with 92 additions and 30 deletions

View File

@ -862,7 +862,9 @@ int qse_fio_init (
if (flags & QSE_FIO_CREATE) desired_access |= O_CREAT;
if (flags & QSE_FIO_TRUNCATE) desired_access |= O_TRUNC;
if (flags & QSE_FIO_EXCLUSIVE) desired_access |= O_EXCL;
#if defined(O_SYNC)
if (flags & QSE_FIO_SYNC) desired_access |= O_SYNC;
#endif
#if defined(O_NOFOLLOW)
if (flags & QSE_FIO_NOFOLLOW) desired_access |= O_NOFOLLOW;

View File

@ -421,7 +421,12 @@
#elif defined(HAVE_DIR_D_FD)
# define QSE_DIRFD(dir) ((dir)->d_fd)
#else
# error OUCH!!! NO DIRFD AVAILABLE
# if defined(dirfd)
/* mac os x 10.1 defines dirfd as a macro */
# define QSE_DIRFD(dir) dirfd(dir)
# else
# error OUCH!!! NO DIRFD AVAILABLE
# endif
#endif
#define QSE_DIR DIR