--- libeio/eio.c 2016/02/23 19:42:44 1.140 +++ libeio/eio.c 2016/12/03 16:33:46 1.143 @@ -44,11 +44,6 @@ #include "eio.h" #include "ecb.h" -#ifdef EIO_STACKSIZE -# define X_STACKSIZE EIO_STACKSIZE -#endif -#include "xthread.h" - #include #include #include @@ -124,6 +119,8 @@ #define dup2(fd1,fd2) _dup2 (fd1, fd2) #define pipe(fds) _pipe (fds, 4096, O_BINARY) + #define fcntl(fd,cmd,arg) EIO_ENOSYS () + #define ioctl(fd,cmd,arg) EIO_ENOSYS () #define fchmod(fd,mode) EIO_ENOSYS () #define chown(path,uid,gid) EIO_ENOSYS () #define fchown(fd,uid,gid) EIO_ENOSYS () @@ -206,11 +203,15 @@ symlink (const char *old, const char *neu) { #if WINVER >= 0x0600 - if (CreateSymbolicLink (neu, old, 1)) - return 0; + int flags; - if (CreateSymbolicLink (neu, old, 0)) - return 0; + /* This tries out all combinations of SYMBOLIC_LINK_FLAG_DIRECTORY + * and SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE, + * with directory first. + */ + for (flags = 3; flags >= 0; --flags) + if (CreateSymbolicLink (neu, old, flags)) + return 0; #endif return EIO_ERRNO (ENOENT, -1); @@ -285,10 +286,6 @@ # include #endif -#if HAVE_SYS_PRCTL_H -# include -#endif - #if HAVE_SENDFILE # if __linux # include