mirror of
https://github.com/intrepidcs/icsscand.git
synced 2026-08-05 17:48:15 +02:00
Set timeout tv_sec instead of tv_usec for compatibility with older kernels
This commit is contained in:
+2
-3
@@ -451,9 +451,8 @@ int main(int argc, char** argv) {
|
||||
FD_ZERO(&fds);
|
||||
FD_SET(driver, &fds);
|
||||
|
||||
struct timeval timeout;
|
||||
timeout.tv_sec = 0;
|
||||
timeout.tv_usec = 1000 * 1000; // 1s
|
||||
struct timeval timeout = {};
|
||||
timeout.tv_sec = 1;
|
||||
|
||||
auto ret = select(driver + 1, &fds, NULL, NULL, &timeout);
|
||||
if(ret == -1) {
|
||||
|
||||
Reference in New Issue
Block a user