jenkins-core-weekly: update to 2.491
[oi-userland.git] / components / library / gcr / patches / 04-upstream.patch
blobf1cadefeba7e6bf22e5a53190327d651c0c1128b
1 From 3fa3e702f08a9d892cd26604f290f3af41910adc Mon Sep 17 00:00:00 2001
2 From: Alan Coopersmith <alan.coopersmith@oracle.com>
3 Date: Sun, 15 Jan 2017 21:01:35 -0800
4 Subject: [PATCH] Fix test-secure-memory build on platforms without
5 RLIMIT_MEMLOCK
7 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
9 https://bugzilla.gnome.org/show_bug.cgi?id=777294
10 ---
11 gcr/test-secure-memory.c | 5 +++++
12 1 file changed, 5 insertions(+)
14 diff --git a/gcr/test-secure-memory.c b/gcr/test-secure-memory.c
15 index 7ef5b2f..8feba83 100644
16 --- a/gcr/test-secure-memory.c
17 +++ b/gcr/test-secure-memory.c
18 @@ -53,6 +53,7 @@ extern int egg_secure_warnings;
19 static gsize
20 get_rlimit_memlock (void)
22 +#ifdef RLIMIT_MEMLOCK
23 struct rlimit memlock;
25 if (getrlimit (RLIMIT_MEMLOCK, &memlock) != 0)
26 @@ -72,6 +73,10 @@ get_rlimit_memlock (void)
29 return memlock.rlim_cur;
30 +#else
31 + g_error("Don't know how to get locked memory limit.");
32 + return 0;
33 +#endif
36 static void
37 --
38 2.7.4