mirror of
https://github.com/owntone/owntone-server.git
synced 2025-03-30 17:23:44 -04:00
[misc] Adding missing header for non-Posix timer platforms
This commit is contained in:
parent
1f4e474671
commit
3a7ed96895
@ -34,6 +34,9 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
#ifndef CLOCK_REALTIME
|
||||||
|
#include <sys/time.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <unistr.h>
|
#include <unistr.h>
|
||||||
#include <uniconv.h>
|
#include <uniconv.h>
|
||||||
@ -954,7 +957,7 @@ timespec_reltoabs(struct timespec relative)
|
|||||||
{
|
{
|
||||||
struct timespec absolute;
|
struct timespec absolute;
|
||||||
|
|
||||||
#if _POSIX_TIMERS > 0
|
#ifdef CLOCK_REALTIME
|
||||||
clock_gettime(CLOCK_REALTIME, &absolute);
|
clock_gettime(CLOCK_REALTIME, &absolute);
|
||||||
#else
|
#else
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user