mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 03:17:34 +00:00
Ports: Update c-ray's patches to use git patches
This commit is contained in:
parent
8b9302890e
commit
4874465018
17 changed files with 654 additions and 105 deletions
35
Ports/c-ray/patches/0005-Use-usleep-on-serenity.patch
Normal file
35
Ports/c-ray/patches/0005-Use-usleep-on-serenity.patch
Normal file
|
@ -0,0 +1,35 @@
|
|||
From 2bbcdcb8ca63d8a9cf475b148f9f11f97df14c35 Mon Sep 17 00:00:00 2001
|
||||
From: Linus Groh <mail@linusgroh.de>
|
||||
Date: Sat, 13 Mar 2021 22:11:07 +0100
|
||||
Subject: [PATCH 5/8] Use usleep() on serenity
|
||||
|
||||
Co-Authored-By: Valtteri Koskivuori <vkoskiv@gmail.com>
|
||||
---
|
||||
src/utils/timer.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/utils/timer.c b/src/utils/timer.c
|
||||
index dd83497..3a4357f 100644
|
||||
--- a/src/utils/timer.c
|
||||
+++ b/src/utils/timer.c
|
||||
@@ -48,7 +48,7 @@ long getUs(struct timeval timer) {
|
||||
return ((tmr2.tv_sec - timer.tv_sec) * 1000000) + (tmr2.tv_usec - timer.tv_usec);
|
||||
}
|
||||
|
||||
-#ifdef __linux__
|
||||
+#if defined(__linux__) || defined(__serenity__)
|
||||
#define _BSD_SOURCE
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
@@ -66,7 +66,7 @@ void sleepMSec(int ms) {
|
||||
ts.tv_sec = ms / 1000;
|
||||
ts.tv_nsec = (ms % 1000) * 1000000;
|
||||
nanosleep(&ts, NULL);
|
||||
-#elif __linux__
|
||||
+#elif defined(__linux__) || defined(__serenity__)
|
||||
usleep(ms * 1000);
|
||||
#endif
|
||||
}
|
||||
--
|
||||
2.36.1
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue