Include time.h, and fix a Darwin warning

This is a little more cleanup from r300579.

llvm-svn: 300615
This commit is contained in:
Chris Bieneman 2017-04-18 22:11:13 +00:00
parent fe64c0137e
commit ea02aa1585
1 changed files with 2 additions and 8 deletions

View File

@ -16,6 +16,7 @@
#include <cerrno>
#include <csignal>
#include <vector>
#include <time.h>
#if HAVE_SYS_EVENT_H
#include <sys/event.h>
@ -33,13 +34,6 @@
#if !HAVE_PPOLL && !HAVE_SYS_EVENT_H
#ifdef LLVM_ON_WIN32
struct timespec {
time_t tv_sec;
suseconds_t tv_nsec;
};
#endif
int ppoll(struct pollfd *fds, size_t nfds, const struct timespec *timeout_ts,
const sigset_t *) {
int timeout =
@ -160,7 +154,6 @@ void MainLoop::UnregisterSignal(int signo) {
Error MainLoop::Run() {
std::vector<int> signals;
sigset_t sigmask;
m_terminate_request = false;
signals.reserve(m_signals.size());
@ -172,6 +165,7 @@ Error MainLoop::Run() {
std::vector<struct kevent> events;
events.reserve(m_read_fds.size() + m_signals.size());
#else
sigset_t sigmask;
std::vector<struct pollfd> read_fds;
read_fds.reserve(m_read_fds.size());
#endif