mirror of https://github.com/ericonr/sndio.git
panic if CLOCK_MONOTONIC is unsupported
This commit is contained in:
parent
02a873aace
commit
8af6aa7130
|
@ -46,7 +46,6 @@
|
|||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <poll.h>
|
||||
|
@ -446,14 +445,14 @@ filelist_init(void)
|
|||
{
|
||||
sigset_t set;
|
||||
|
||||
sigemptyset(&set);
|
||||
(void)sigaddset(&set, SIGPIPE);
|
||||
if (sigprocmask(SIG_BLOCK, &set, NULL))
|
||||
err(1, "sigprocmask");
|
||||
file_list = NULL;
|
||||
if (clock_gettime(CLOCK_MONOTONIC, &file_ts) < 0) {
|
||||
err(1, "clock_gettime");
|
||||
log_puts("filelist_init: CLOCK_MONOTONIC unsupported\n");
|
||||
panic();
|
||||
}
|
||||
sigemptyset(&set);
|
||||
sigaddset(&set, SIGPIPE);
|
||||
sigprocmask(SIG_BLOCK, &set, NULL);
|
||||
file_list = NULL;
|
||||
log_sync = 0;
|
||||
timo_init();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue