Skip to content

Commit 6714b98

Browse files
committed
Preparations for v0.9.11 release
1 parent 3e56ada commit 6714b98

File tree

6 files changed

+30
-19
lines changed

6 files changed

+30
-19
lines changed

NEWS

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
Since 0.9.10:
2+
- Fixed various cross-platform compile-time issues
3+
- Honor nanosecond parameters/fields in relevant system calls
4+
- Limited improvements to enhance compatibility with other
5+
LD_PRELOAD libraries
6+
- Added selected more intercepted system calls
7+
- Unset FAKETIME_SHARED automatically for child processes
8+
when enabling FAKETIME_FLSHM=1
9+
- Disable shared memory for child processes through
10+
FAKETIME_DISABLE_SHM=1
11+
112
Since 0.9.9:
213
- automatically try to decide about FORCE_MONOTONIC_FIX
314
at run-time when not set as a compile-time flag

README

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
libfaketime, version 0.9.10 (March 2022)
2-
========================================
1+
libfaketime, version 0.9.11 (May 2025)
2+
======================================
33

44

55
Content of this file:

man/faketime.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH FAKETIME "1" "March 2022" "faketime 0.9.10" wolfcw
1+
.TH FAKETIME "1" "May 2025" "faketime 0.9.11" wolfcw
22
.SH NAME
33
faketime \- manipulate the system time for a given command
44
.SH SYNOPSIS

src/Makefile.OSX

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ INSTALL ?= install
5656
PREFIX ?= /usr/local
5757

5858
CFLAGS += -DFAKE_SLEEP -DFAKE_INTERNAL_CALLS -DPREFIX='"'${PREFIX}'"' $(FAKETIME_COMPILE_CFLAGS) -DMACOS_DYLD_INTERPOSE -DFAKE_SETTIME
59-
LIB_LDFLAGS += -dynamiclib -current_version 0.9.10 -compatibility_version 0.7
59+
LIB_LDFLAGS += -dynamiclib -current_version 0.9.11 -compatibility_version 0.7
6060

6161
# ARM64 MacOS (M1/M2/M3/Apple Silicon/etc) processors require a target set as their current version, or they
6262
# will receive the following error:

src/faketime.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* libfaketime wrapper command
33
*
4-
* This file is part of libfaketime, version 0.9.10
4+
* This file is part of libfaketime, version 0.9.11
55
*
66
* libfaketime is free software; you can redistribute it and/or modify it
77
* under the terms of the GNU General Public License v2 as published by the
@@ -48,7 +48,7 @@
4848

4949
#include "faketime_common.h"
5050

51-
const char version[] = "0.9.10";
51+
const char version[] = "0.9.11";
5252

5353
#if (defined __APPLE__) || (defined __sun)
5454
static const char *date_cmd = "gdate";

src/libfaketime.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* This file is part of libfaketime, version 0.9.10
2+
* This file is part of libfaketime, version 0.9.11
33
*
44
* libfaketime is free software; you can redistribute it and/or modify it
55
* under the terms of the GNU General Public License v2 as published by the
@@ -4195,21 +4195,21 @@ long handle_futex_syscall(long number, uint32_t* uaddr, int futex_op, uint32_t v
41954195
// not timeout related, just call the real syscall
41964196
goto futex_fallback;
41974197
}
4198-
4198+
41994199
// if ((futex_op & FUTEX_CMD_MASK) == FUTEX_WAIT_BITSET) {
42004200
if (1) {
42014201
clockid_t clk_id = CLOCK_MONOTONIC;
42024202
if (futex_op & FUTEX_CLOCK_REALTIME)
42034203
clk_id = CLOCK_REALTIME;
42044204

42054205
struct timespec real_tp, fake_tp;
4206-
4206+
42074207
DONT_FAKE_TIME((*real_clock_gettime)(clk_id, &real_tp));
42084208
fake_tp = real_tp;
42094209
if (fake_clock_gettime(clk_id, &fake_tp) == -1) {
42104210
goto futex_fallback;
42114211
}
4212-
// Create a corrected timeout by adjusting with the difference between
4212+
// Create a corrected timeout by adjusting with the difference between
42134213
// real and fake timestamps
42144214
struct timespec adjusted_timeout, time_diff;
42154215
timespecsub(&fake_tp, &real_tp, &time_diff);
@@ -4218,15 +4218,15 @@ long handle_futex_syscall(long number, uint32_t* uaddr, int futex_op, uint32_t v
42184218
long result;
42194219
result = real_syscall(number, uaddr, futex_op, val, &adjusted_timeout, uaddr2, val3);
42204220
if (result != 0) {
4221-
return result;
4221+
return result;
42224222
}
4223-
4223+
42244224
// Check if the futex timeout has already passed according to fake time
42254225
struct timespec now_fake;
42264226
if (fake_clock_gettime(clk_id, &now_fake) != 0) {
42274227
return result;
42284228
}
4229-
4229+
42304230
// If the timeout is already passed in fake time, return 0.
42314231
while (!timespeccmp(&now_fake, timeout, >=)) {
42324232
// Calculate how much real time we need to wait
@@ -4249,15 +4249,15 @@ long handle_futex_syscall(long number, uint32_t* uaddr, int futex_op, uint32_t v
42494249
struct timespec real_timeout;
42504250
timespecadd(&real_now, &wait_time, &real_timeout);
42514251

4252-
// fprintf(stdout, "libfaketime: recalculated real timeout: %ld.%09ld\n",
4252+
// fprintf(stdout, "libfaketime: recalculated real timeout: %ld.%09ld\n",
42534253
// real_timeout.tv_sec, real_timeout.tv_nsec);
42544254

42554255
// Call the real syscall with the recalculated timeout
42564256
result = real_syscall(number, uaddr, futex_op, val, &real_timeout, uaddr2, val3);
42574257
if (result != 0) {
4258-
return result;
4258+
return result;
42594259
}
4260-
4260+
42614261
// Check if the futex timeout has already passed according to fake time
42624262
if (fake_clock_gettime(clk_id, &now_fake) != 0) {
42634263
return result;
@@ -4267,7 +4267,7 @@ long handle_futex_syscall(long number, uint32_t* uaddr, int futex_op, uint32_t v
42674267
} else {
42684268
return real_syscall(number, uaddr, futex_op, val, timeout, uaddr2, val3);
42694269
}
4270-
4270+
42714271
futex_fallback:
42724272
return real_syscall(number, uaddr, futex_op, val, timeout, uaddr2, val3);
42734273
}
@@ -4298,7 +4298,7 @@ long syscall(long number, ...) {
42984298
va_end(ap);
42994299
return clock_gettime(clk_id, tp);
43004300
}
4301-
4301+
43024302
#ifdef INTERCEPT_FUTEX
43034303
if (number == __NR_futex) {
43044304
uint32_t *uaddr;
@@ -4314,7 +4314,7 @@ long syscall(long number, ...) {
43144314
timeout = va_arg(ap, struct timespec*);
43154315
uaddr2 = va_arg(ap, uint32_t*);
43164316
val3 = va_arg(ap, uint32_t);
4317-
va_end(ap);
4317+
va_end(ap);
43184318

43194319
return handle_futex_syscall(number, uaddr, futex_op, val, timeout, uaddr2, val3);
43204320
}

0 commit comments

Comments
 (0)