Here's the error:
Here's part of the patch, just for this file:
As you can see, in my flailing around I've tried including a few extra things from sys, but they didn't help. I can see timeval defined in sys/time.h, but it doesn't have tv_nsec, only tv_usec.
Or more likely, I'm totally lost.
Code:
io_curl.c: In function 'curl_read_internal':
io_curl.c:381:12: error: 'struct timeval' has no member named 'tv_nsec'; did you mean 'tv_sec'?
381 | timeout.tv_nsec = (milliseconds % 1000L) * 1000000L;
| ^~~~~~~
| tv_sec
make[2]: *** [Makefile:777: io_curl.o] Error 1
Code:
diff -Naur trunk.orig/io_curl.c trunk/io_curl.c
--- trunk.orig/io_curl.c 2018-12-27 06:58:23.000000000 +0000
+++ trunk/io_curl.c 2020-02-05 20:21:24.148952435 +0000
@@ -23,6 +23,10 @@
#include <errno.h>
#include <assert.h>
#include <stdint.h>
+#include <time.h>
+#include <sys/time.h>
+#include <sys/timespec.h>
+#include <sys/ktime.h>
#define DEBUG
@@ -33,6 +37,7 @@
#include "options.h"
#include "lists.h"
+
static char user_agent[] = PACKAGE_NAME"/"PACKAGE_VERSION;
void io_curl_init ()
@@ -346,7 +351,11 @@
fd_set read_fds, write_fds, exc_fds;
int max_fd, ret;
long milliseconds;
+ #if defined(__sgi)
+ struct timeval timeout;
+ #else
struct timespec timeout;
+ #endif
logit ("Doing pselect()...");
@@ -371,8 +380,12 @@
timeout.tv_sec = milliseconds / 1000;
timeout.tv_nsec = (milliseconds % 1000L) * 1000000L;
+ #if defined(__sgi)
+ ret = select (max_fd +1, &read_fds, &write_fds, &exc_fds, &timeout);
+ #else
ret = pselect (max_fd + 1, &read_fds, &write_fds, &exc_fds,
&timeout, NULL);
+ #endif
if (ret < 0 && errno == EINTR) {
logit ("Interrupted");
As you can see, in my flailing around I've tried including a few extra things from sys, but they didn't help. I can see timeval defined in sys/time.h, but it doesn't have tv_nsec, only tv_usec.
Or more likely, I'm totally lost.