Commit fff49b23 authored by Uli Schlachter's avatar Uli Schlachter
Browse files

Add FAIL_PRE_INIT_CALLS define

This commit adds a new define FAIL_PRE_INIT_CALLS. When that define is
set, calls to clock_gettime() that occur before ftpl_init() was called
(due to being marked with __attribute__((constructor))) will just fail
and return -1.

After this commit, the test case added in the previous commit no longer
hangs. To make this actually work, this new define is enabled by
default.

Fixes: https://github.com/wolfcw/libfaketime/issues/365


Signed-off-by: default avatarUli Schlachter <psychon@znc.in>
parent 6e0f9780
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment