|
| 1 | +diff --git a/meson.build b/meson.build |
| 2 | +--- meson.build.orig |
| 3 | ++++ meson.build |
| 4 | +@@ -79,6 +79,10 @@ backends = [] |
| 5 | + have_rtld_noload = cc.has_header_symbol('dlfcn.h', 'RTLD_NOLOAD') |
| 6 | + config_h.set('HAVE_RTLD_NOLOAD', have_rtld_noload) |
| 7 | + |
| 8 | ++# *** Check for clockid_t *** |
| 9 | ++have_clockid_t = cc.has_header_symbol('time.h', 'clockid_t') |
| 10 | ++config_h.set('HAVE_CLOCKID_T', have_clockid_t) |
| 11 | ++ |
| 12 | + # *** Checks for GnuTLS *** |
| 13 | + gnutls_dep = dependency('gnutls', version: '>= 3.7.4', required: get_option('gnutls')) |
| 14 | + |
| 15 | +diff --git a/tls/tests/connection.c b/tls/tests/connection.c |
| 16 | +--- tls/tests/connection.c.orig |
| 17 | ++++ tls/tests/connection.c |
| 18 | +@@ -585,7 +585,7 @@ read_test_data_async (TestConnection *test) |
| 19 | + g_object_unref (stream); |
| 20 | + } |
| 21 | + |
| 22 | +-#if defined(G_OS_UNIX) |
| 23 | ++#if defined(G_OS_UNIX) && defined(HAVE_CLOCKID_T) |
| 24 | + typedef int (*clock_gettime_fnptr)(clockid_t clk_id, struct timespec *tp); |
| 25 | + static __thread clock_gettime_fnptr original_clock_gettime = NULL; |
| 26 | + |
| 27 | +@@ -629,7 +629,7 @@ test_connection_session_resume_ten_minute_expiry (TestConnection *test, |
| 28 | + GSocketClient *client; |
| 29 | + gboolean reused = FALSE; |
| 30 | + |
| 31 | +-#if !defined(G_OS_UNIX) |
| 32 | ++#if !defined(G_OS_UNIX) || !defined(HAVE_CLOCKID_T) |
| 33 | + g_test_skip ("test_connection_session_resume_ten_minute_expiry requires interposing clock_gettime which is only available in UNIX platforms"); |
| 34 | + return; |
| 35 | + #endif |
0 commit comments