-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error: conflicting types for ‘gettimeofday’ #69
Comments
I don't have arch. Be the change you want to see in the world :-) |
@zardus what information could I provide to help you? :) |
this is caused by glibc-2.31
Changing the second parameter of the |
I encountered the same problem with Fedora 32 today! Best |
As pointed out by @SjonHortensius builds can be possible with diff --git a/src/detime.c b/src/detime.c
index 441b584..5c9a8ce 100644
--- a/src/detime.c
+++ b/src/detime.c
@@ -21,9 +21,9 @@ time_t time(time_t *res)
}
#ifdef __unix__
-int gettimeofday(struct timeval *tv, struct timezone *tz)
+int gettimeofday(struct timeval *tv, void *__restrict tzp)
{
-
+ struct timezone *tz = (struct timezone *) tzp;
char *sec_str = getenv("TV_SEC");
char *usec_str = getenv("TV_USEC");
tv->tv_sec = sec_str ? atoi(sec_str) : 0; But since now /* Get the current time of day, putting it into *TV.
If *TZ is not NULL, clear it.
Returns 0 on success, -1 on errors. */
int
___gettimeofday (struct timeval *restrict tv, void *restrict tz)
{
if (__glibc_unlikely (tz != 0))
memset (tz, 0, sizeof (struct timezone));
struct timespec ts;
if (__clock_gettime (CLOCK_REALTIME, &ts))
return -1;
TIMESPEC_TO_TIMEVAL (tv, &ts);
return 0;
} Should we get preeny to reflect that for newer builds? |
Build fails on Arch Linux:
Thanks in advance!
The text was updated successfully, but these errors were encountered: