* posix-io.c (_gpgme_io_select): Don't use a non-constant struct initializer.
* version.c (_gpgme_get_program_version): Likewise.
Reported by Dr. Stefan Dalibor <Dr.Stefan.Dalibor@bfa.de>.
+2002-09-02 Marcus Brinkmann <marcus@g10code.de>
+
+ * posix-io.c (_gpgme_io_select): Don't use a non-constant struct initializer.
+ * version.c (_gpgme_get_program_version): Likewise.
+ Reported by Dr. Stefan Dalibor <Dr.Stefan.Dalibor@bfa.de>.
+
2002-09-02 Marcus Brinkmann <marcus@g10code.de>
* conversion.c (_gpgme_decode_c_string): Set DESTP before modifying DEST.
fd_set readfds;
fd_set writefds;
int any, i, max_fd, n, count;
- struct timeval timeout = { nonblock ? 0 : 1, 0 }; /* Use a 1s timeout. */
+ struct timeval timeout = { 1, 0 }; /* Use a 1s timeout. */
void *dbg_help = NULL;
FD_ZERO (&readfds);
FD_ZERO (&writefds);
max_fd = 0;
+ if (nonblock)
+ timeout.tv_sec = 0;
DEBUG_BEGIN (dbg_help, 3, "gpgme:select on [ ");
any = 0;
char *mark = NULL;
int rp[2];
int nread;
- char *argv[] = {(char *) path, "--version", 0};
+ char *argv[] = {NULL /* path */, "--version", 0};
struct spawn_fd_item_s pfd[] = { {0, -1}, {-1, -1} };
struct spawn_fd_item_s cfd[] = { {-1, 1 /* STDOUT_FILENO */}, {-1, -1} };
int status;
if (!path)
return NULL;
+ argv[0] = (char *) path;
if (_gpgme_io_pipe (rp, 1) < 0)
return NULL;