libsoup3: update to 3.6.0; fix GTK2/3 app startup
[oi-userland.git] / components / developer / gcc-12 / patches / 0033-Fix-cp-module.cc-build-use-posix_madvise.patch
blob99ef8e9b87aa4fc5cb43bd5ecd58a960a789caaa
1 From 6627831da214544482f40afe1c34b804240c7bc8 Mon Sep 17 00:00:00 2001
2 From: Andy Fiddaman <omnios@citrus-it.co.uk>
3 Date: Wed, 28 Apr 2021 12:29:31 +0000
4 Subject: Fix cp/module.cc build - use posix_madvise()
6 ---
7 gcc/cp/module.cc | 4 ++--
8 1 file changed, 2 insertions(+), 2 deletions(-)
10 diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc
11 index 5c5d02bb523..74dc81a9e0e 100644
12 --- a/gcc/cp/module.cc
13 +++ b/gcc/cp/module.cc
14 @@ -1639,7 +1639,7 @@ elf_in::defrost (const char *name)
15 set_error (errno);
16 else
18 - if (madvise (mapping, hdr.pos, MADV_RANDOM))
19 + if (posix_madvise (mapping, hdr.pos, MADV_RANDOM))
20 goto fail;
22 /* These buffers are never NULL in this case. */
23 @@ -1750,7 +1750,7 @@ elf_in::begin (location_t loc)
25 /* We'll be hopping over this randomly. Some systems declare the
26 first parm as char *, and other declare it as void *. */
27 - if (madvise (reinterpret_cast <char *> (mapping), size, MADV_RANDOM))
28 + if (posix_madvise (reinterpret_cast <char *> (mapping), size, MADV_RANDOM))
29 goto fail;
31 hdr.buffer = (char *)mapping;