mirror of
https://github.com/RGBCube/serenity
synced 2025-07-31 09:07:35 +00:00
Ports: Update fontconfig's patches to use git patches
This commit is contained in:
parent
4fa66c91d5
commit
d383bae7d3
4 changed files with 54 additions and 14 deletions
81
Ports/fontconfig/patches/0001-Stub-out-FcRandom.patch
Normal file
81
Ports/fontconfig/patches/0001-Stub-out-FcRandom.patch
Normal file
|
@ -0,0 +1,81 @@
|
|||
From d84d340b3b9b87902011065a1ea4e97c7f3eb095 Mon Sep 17 00:00:00 2001
|
||||
From: Brendan Coles <bcoles@gmail.com>
|
||||
Date: Tue, 26 Oct 2021 11:34:34 +0000
|
||||
Subject: [PATCH 1/2] Stub out FcRandom()
|
||||
|
||||
---
|
||||
src/fccompat.c | 51 --------------------------------------------------
|
||||
1 file changed, 51 deletions(-)
|
||||
|
||||
diff --git a/src/fccompat.c b/src/fccompat.c
|
||||
index 65ac84c..96e4087 100644
|
||||
--- a/src/fccompat.c
|
||||
+++ b/src/fccompat.c
|
||||
@@ -184,54 +184,6 @@ FcRandom(void)
|
||||
{
|
||||
int32_t result;
|
||||
|
||||
-#if HAVE_RANDOM_R
|
||||
- static struct random_data fcrandbuf;
|
||||
- static char statebuf[256];
|
||||
- static FcBool initialized = FcFalse;
|
||||
-#ifdef _AIX
|
||||
- static char *retval;
|
||||
- long res;
|
||||
-#endif
|
||||
-
|
||||
- if (initialized != FcTrue)
|
||||
- {
|
||||
-#ifdef _AIX
|
||||
- initstate_r (time (NULL), statebuf, 256, &retval, &fcrandbuf);
|
||||
-#else
|
||||
- initstate_r (time (NULL), statebuf, 256, &fcrandbuf);
|
||||
-#endif
|
||||
- initialized = FcTrue;
|
||||
- }
|
||||
-
|
||||
-#ifdef _AIX
|
||||
- random_r (&res, &fcrandbuf);
|
||||
- result = (int32_t)res;
|
||||
-#else
|
||||
- random_r (&fcrandbuf, &result);
|
||||
-#endif
|
||||
-#elif HAVE_RANDOM
|
||||
- static char statebuf[256];
|
||||
- char *state;
|
||||
- static FcBool initialized = FcFalse;
|
||||
-
|
||||
- if (initialized != FcTrue)
|
||||
- {
|
||||
- state = initstate (time (NULL), statebuf, 256);
|
||||
- initialized = FcTrue;
|
||||
- }
|
||||
- else
|
||||
- state = setstate (statebuf);
|
||||
-
|
||||
- result = random ();
|
||||
-
|
||||
- setstate (state);
|
||||
-#elif HAVE_LRAND48
|
||||
- result = lrand48 ();
|
||||
-#elif HAVE_RAND_R
|
||||
- static unsigned int seed = time (NULL);
|
||||
-
|
||||
- result = rand_r (&seed);
|
||||
-#elif HAVE_RAND
|
||||
static FcBool initialized = FcFalse;
|
||||
|
||||
if (initialized != FcTrue)
|
||||
@@ -240,9 +192,6 @@ FcRandom(void)
|
||||
initialized = FcTrue;
|
||||
}
|
||||
result = rand ();
|
||||
-#else
|
||||
-# error no random number generator function available.
|
||||
-#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
--
|
||||
2.36.1
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue