mirror of
https://github.com/irssi/irssi.git
synced 2026-08-11 04:43:34 +02:00
remove GTimeVal following glib 2.61.2 deprecation
This commit is contained in:
parent
4c5f708b9b
commit
1cdb4bc311
14 changed files with 74 additions and 69 deletions
|
|
@ -94,8 +94,11 @@ int g_input_add_poll(int fd, int priority, int condition,
|
|||
return ret;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
int g_timeval_cmp(const GTimeVal *tv1, const GTimeVal *tv2)
|
||||
{
|
||||
#pragma GCC diagnostic pop
|
||||
if (tv1->tv_sec < tv2->tv_sec)
|
||||
return -1;
|
||||
if (tv1->tv_sec > tv2->tv_sec)
|
||||
|
|
@ -105,8 +108,11 @@ int g_timeval_cmp(const GTimeVal *tv1, const GTimeVal *tv2)
|
|||
tv1->tv_usec > tv2->tv_usec ? 1 : 0;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
long get_timeval_diff(const GTimeVal *tv1, const GTimeVal *tv2)
|
||||
{
|
||||
#pragma GCC diagnostic pop
|
||||
long secs, usecs;
|
||||
|
||||
secs = tv1->tv_sec - tv2->tv_sec;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue