Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2023-11-28 12:54:53 +0300
committerFelix Fietkau <nbd@nbd.name>2023-11-28 12:54:54 +0300
commitb77f2a4ce9034d4341668bb61ca55fc177ee7729 (patch)
tree8c708a57e17f75f0a422f23b0b71baeeb4cce9c9 /uloop-kqueue.c
parentd4c3066e7c5efa5f395c21db77609516d386cbf8 (diff)
uloop: fix build using C++ compilers
Rename the 'private' field to 'priv' in order to avoid using a C++ keyword Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'uloop-kqueue.c')
-rw-r--r--uloop-kqueue.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/uloop-kqueue.c b/uloop-kqueue.c
index a48cca0..c81f815 100644
--- a/uloop-kqueue.c
+++ b/uloop-kqueue.c
@@ -135,7 +135,7 @@ static int uloop_fetch_events(int timeout)
if (events[n].filter == EVFILT_TIMER) {
struct uloop_interval *tm = events[n].udata;
- tm->private.time.fired = get_timestamp_us();
+ tm->priv.time.fired = get_timestamp_us();
tm->expirations += events[n].data;
tm->cb(tm);
@@ -180,8 +180,8 @@ static int timer_register(struct uloop_interval *tm, unsigned int msecs)
{
struct kevent ev;
- tm->private.time.msecs = msecs;
- tm->private.time.fired = get_timestamp_us();
+ tm->priv.time.msecs = msecs;
+ tm->priv.time.fired = get_timestamp_us();
EV_SET(&ev, (uintptr_t)tm, EVFILT_TIMER, EV_ADD, NOTE_USECONDS, msecs * 1000, tm);
@@ -199,11 +199,11 @@ static int timer_remove(struct uloop_interval *tm)
static int64_t timer_next(struct uloop_interval *tm)
{
- int64_t t1 = tm->private.time.fired;
+ int64_t t1 = tm->priv.time.fired;
int64_t t2 = get_timestamp_us();
while (t1 < t2)
- t1 += tm->private.time.msecs * 1000;
+ t1 += tm->priv.time.msecs * 1000;
return (t1 - t2) / 1000;
}