diff options
Diffstat (limited to 'g10/encrypt.c')
-rw-r--r-- | g10/encrypt.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/g10/encrypt.c b/g10/encrypt.c index 671f8f6df..c8e796214 100644 --- a/g10/encrypt.c +++ b/g10/encrypt.c @@ -524,7 +524,17 @@ encrypt_crypt (ctrl_t ctrl, int filefd, const char *filename, } /* Prepare iobufs. */ +#ifdef HAVE_W32_SYSTEM + if (filefd == -1) + inp = iobuf_open_fd_or_name (GNUPG_INVALID_FD, filename, "rb"); + else + { + inp = NULL; + gpg_err_set_errno (ENOSYS); + } +#else inp = iobuf_open_fd_or_name (filefd, filename, "rb"); +#endif if (inp) iobuf_ioctl (inp, IOBUF_IOCTL_NO_CACHE, 1, NULL); if (inp && is_secured_file (iobuf_get_fd (inp))) |