From 97df297ae2b9df6a5717df6949187e27d2eb73de Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Fri, 7 May 2010 01:06:14 +0000 Subject: 2010-05-07 Marcus Brinkmann * engine-gpgsm.c (gpgsm_new, start): Cast between int and assuan_fd_t. * assuan-support.c (my_pipe, my_close, my_read, my_write): Likewise. * gpgme-tool.c (server_data_obj, server_reset_fds, gpgme_server), (my_recvmsg, my_sendmsg, my_spawn): Likewise. * engine-assuan.c (start): Likewise. * engine-g13.c (start): Likewise. --- src/engine-g13.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/engine-g13.c') diff --git a/src/engine-g13.c b/src/engine-g13.c index 07cfe7fa..208fb35c 100644 --- a/src/engine-g13.c +++ b/src/engine-g13.c @@ -632,16 +632,21 @@ static gpgme_error_t start (engine_g13_t g13, const char *command) { gpgme_error_t err; + assuan_fd_t afdlist[5]; int fdlist[5]; int nfds; + int i; /* We need to know the fd used by assuan for reads. We do this by using the assumption that the first returned fd from assuan_get_active_fds() is always this one. */ nfds = assuan_get_active_fds (g13->assuan_ctx, 0 /* read fds */, - fdlist, DIM (fdlist)); + afdlist, DIM (afdlist)); if (nfds < 1) return gpg_error (GPG_ERR_GENERAL); /* FIXME */ + /* For now... */ + for (i = 0; i < nfds; i++) + fdlist[i] = (int) afdlist[i]; /* We "duplicate" the file descriptor, so we can close it here (we can't close fdlist[0], as that is closed by libassuan, and -- cgit v1.2.3