diff --git a/common/iobuf.c b/common/iobuf.c index 2427e4f19..3c5dc800c 100644 --- a/common/iobuf.c +++ b/common/iobuf.c @@ -1522,9 +1522,8 @@ do_iobuf_fdopen (gnupg_fd_t fp, const char *mode, int keep_open) iobuf_t -iobuf_fdopen (int fd, const char *mode) +iobuf_fdopen (gnupg_fd_t fp, const char *mode) { - gnupg_fd_t fp = INT2FD (fd); return do_iobuf_fdopen (fp, mode, 0); } @@ -1583,7 +1582,7 @@ iobuf_sockopen (int fd, const char *mode) log_debug ("iobuf-%d.%d: sockopen '%s'\n", a->no, a->subno, scx->fname); iobuf_ioctl (a, IOBUF_IOCTL_NO_CACHE, 1, NULL); #else - a = iobuf_fdopen (fd, mode); + a = do_iobuf_fdopen (fd, mode, 0); #endif return a; } diff --git a/common/iobuf.h b/common/iobuf.h index c523b8c96..4a723908d 100644 --- a/common/iobuf.h +++ b/common/iobuf.h @@ -333,7 +333,7 @@ iobuf_t iobuf_openrw (const char *fname); creates an input filter. Note: MODE must reflect the file descriptors actual mode! When the filter is destroyed, the file descriptor is closed. */ -iobuf_t iobuf_fdopen (int fd, const char *mode); +iobuf_t iobuf_fdopen (gnupg_fd_t fd, const char *mode); /* Like iobuf_fdopen, but doesn't close the file descriptor when the filter is destroyed. */