Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion gnome/glib-networking/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ depends_run-append \
path:share/curl/curl-ca-bundle.crt:curl-ca-bundle

patchfiles-append \
patch-disable-gio-querymodules-during-destroot.diff
patch-disable-gio-querymodules-during-destroot.diff \
patch-test_connection_session_resume_ten_minute_expiry.diff

compiler.c_standard 2011

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
diff --git a/meson.build b/meson.build
--- meson.build.orig
+++ meson.build
@@ -79,6 +79,10 @@ backends = []
have_rtld_noload = cc.has_header_symbol('dlfcn.h', 'RTLD_NOLOAD')
config_h.set('HAVE_RTLD_NOLOAD', have_rtld_noload)

+# *** Check for clockid_t ***
+have_clockid_t = cc.has_header_symbol('time.h', 'clockid_t')
+config_h.set('HAVE_CLOCKID_T', have_clockid_t)
+
# *** Checks for GnuTLS ***
gnutls_dep = dependency('gnutls', version: '>= 3.7.4', required: get_option('gnutls'))

diff --git a/tls/tests/connection.c b/tls/tests/connection.c
--- tls/tests/connection.c.orig
+++ tls/tests/connection.c
@@ -585,7 +585,7 @@ read_test_data_async (TestConnection *test)
g_object_unref (stream);
}

-#if defined(G_OS_UNIX)
+#if defined(G_OS_UNIX) && defined(HAVE_CLOCKID_T)
typedef int (*clock_gettime_fnptr)(clockid_t clk_id, struct timespec *tp);
static __thread clock_gettime_fnptr original_clock_gettime = NULL;

@@ -629,7 +629,7 @@ test_connection_session_resume_ten_minute_expiry (TestConnection *test,
GSocketClient *client;
gboolean reused = FALSE;

-#if !defined(G_OS_UNIX)
+#if !defined(G_OS_UNIX) || !defined(HAVE_CLOCKID_T)
g_test_skip ("test_connection_session_resume_ten_minute_expiry requires interposing clock_gettime which is only available in UNIX platforms");
return;
#endif