From 301fe24617ffe4717b6c000027ffaf4df74ac55e Mon Sep 17 00:00:00 2001 From: jyelon Date: Wed, 12 Jan 2022 12:27:55 -0500 Subject: [PATCH] Linux driver and windows driver now both working again. --- luprex/core/cpp/driver-linux.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/luprex/core/cpp/driver-linux.cpp b/luprex/core/cpp/driver-linux.cpp index 2828fb2c..2c90d9ff 100644 --- a/luprex/core/cpp/driver-linux.cpp +++ b/luprex/core/cpp/driver-linux.cpp @@ -197,6 +197,23 @@ static int socket_close(SOCKET socket) { return close(socket); } +static int socket_poll(PollVector &pollvec, int mstimeout, std::string &err) { + int status = poll(&pollvec[0], pollvec.size(), mstimeout); + if (status < 0) { + err = strerror_str(errno); + return -1; + } + return 0; +} + +static void socket_init() { + // Nothing needed on linux +} + +static void socket_uninit() { + // Nothing needed on linux +} + static int console_write(const char *bytes, int nbytes) { return write(1, bytes, nbytes); }