Introduction
Introduction Statistics Contact Development Disclaimer Help
fix include for time - gopherproxy-c - Gopher HTTP proxy in C (CGI)
git clone git://git.codemadness.org/gopherproxy-c
Log
Files
Refs
README
LICENSE
---
commit 536c656498826de19a9aa266f59831df7ef74b5f
parent 40a6ccd6cfb99c2849dff4501a54bc7752b63620
Author: Josuah Demangeon <[email protected]>
Date: Sun, 12 Aug 2018 18:30:20 +0200
fix include for time
musl-libc seems to use <sys/time.h> instead of <time.h>
$ find /usr/include -name '*.ch' -exec grep '^struct timeval' {} +
...
/usr/include/sys/time.h: struct timeval it_interval;
/usr/include/sys/time.h: struct timeval it_value;
...
OpenBSD has this in <sys/time.h>:
#ifndef _TIMEVAL_DECLARED
#define _TIMEVAL_DECLARED
/*
* Structure returned by gettimeofday(2) system call,
* and used in other calls.
*/
struct timeval {
time_t tv_sec; /* seconds */
suseconds_t tv_usec; /* and microseconds */
};
#endif
Diffstat:
M gopherproxy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gopherproxy.c b/gopherproxy.c
@@ -1,4 +1,5 @@
#include <sys/socket.h>
+#include <sys/time.h>
#include <sys/types.h>
#include <ctype.h>
@@ -8,7 +9,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <time.h>
#include <unistd.h>
#define MAX_RESPONSETIMEOUT 10 /* timeout in seconds */
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.