pkgsrc/www/elinks/patches/patch-ah
drochner 29f04494fc -fix some pointer typecast nonsense which breaks if time_t is not "long",
makes the select() main loop work again on NetBSD-current,
 bump PKGREVISION
-use the libgnutls-config hack so that https works with gnutls-2.8
2009-07-02 20:04:12 +00:00

24 lines
699 B
Text

$NetBSD: patch-ah,v 1.1 2009/07/02 20:04:12 drochner Exp $
--- src/main/select.c.orig 2008-09-21 10:45:22.000000000 +0200
+++ src/main/select.c
@@ -223,7 +223,7 @@ select_loop(void (*init)(void))
check_bottom_halves();
while (!program.terminate) {
- struct timeval *timeout = NULL;
+ struct timeval tos, *timeout = NULL;
int n, i, has_timer;
timeval_T t;
@@ -264,7 +264,9 @@ select_loop(void (*init)(void))
if (has_timer) {
/* Be sure timeout is not negative. */
timeval_limit_to_zero_or_one(&t);
- timeout = (struct timeval *) &t;
+ tos.tv_sec = t.sec;
+ tos.tv_usec = t.usec;
+ timeout = &tos;
}
n = select(w_max, &x_read, &x_write, &x_error, timeout);