diff options
author | Tomáš Mózes <hydrapolic@gmail.com> | 2021-10-12 06:45:26 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-10-20 09:59:24 +0000 |
commit | 5652c3f0765602f7b5250ae294546bd1797e1b1d (patch) | |
tree | 6f9575b2f885a7498ce41784eda64132dc77c26b /app-emulation/xen-tools/files | |
parent | app-emulation/xen: add upstream security patches (diff) | |
download | gentoo-5652c3f0765602f7b5250ae294546bd1797e1b1d.tar.gz gentoo-5652c3f0765602f7b5250ae294546bd1797e1b1d.tar.bz2 gentoo-5652c3f0765602f7b5250ae294546bd1797e1b1d.zip |
app-emulation/xen-tools: fix building with USE=ovmf
Closes: https://bugs.gentoo.org/816987
Signed-off-by: Tomáš Mózes <hydrapolic@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-emulation/xen-tools/files')
-rw-r--r-- | app-emulation/xen-tools/files/xen-tools-4.15.1-brotli-gcc11.patch | 33 | ||||
-rw-r--r-- | app-emulation/xen-tools/files/xen-tools-4.15.1-edk2-python3.9.patch | 26 |
2 files changed, 59 insertions, 0 deletions
diff --git a/app-emulation/xen-tools/files/xen-tools-4.15.1-brotli-gcc11.patch b/app-emulation/xen-tools/files/xen-tools-4.15.1-brotli-gcc11.patch new file mode 100644 index 000000000000..c30cb328460d --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-4.15.1-brotli-gcc11.patch @@ -0,0 +1,33 @@ +diff --git a/c/dec/decode.c b/c/dec/decode.c +index ae5a3d3f..7eee9688 100644 +--- a/c/dec/decode.c ++++ b/c/dec/decode.c +@@ -2033,8 +2033,10 @@ static BROTLI_NOINLINE BrotliDecoderErrorCode SafeProcessCommands( + } + + BrotliDecoderResult BrotliDecoderDecompress( +- size_t encoded_size, const uint8_t* encoded_buffer, size_t* decoded_size, +- uint8_t* decoded_buffer) { ++ size_t encoded_size, ++ const uint8_t encoded_buffer[BROTLI_ARRAY_PARAM(encoded_size)], ++ size_t* decoded_size, ++ uint8_t decoded_buffer[BROTLI_ARRAY_PARAM(*decoded_size)]) { + BrotliDecoderState s; + BrotliDecoderResult result; + size_t total_out = 0; +diff --git a/c/enc/encode.c b/c/enc/encode.c +index 8d90937b..0c49c641 100644 +--- a/c/enc/encode.c ++++ b/c/enc/encode.c +@@ -1470,8 +1470,9 @@ static size_t MakeUncompressedStream( + + BROTLI_BOOL BrotliEncoderCompress( + int quality, int lgwin, BrotliEncoderMode mode, size_t input_size, +- const uint8_t* input_buffer, size_t* encoded_size, +- uint8_t* encoded_buffer) { ++ const uint8_t input_buffer[BROTLI_ARRAY_PARAM(input_size)], ++ size_t* encoded_size, ++ uint8_t encoded_buffer[BROTLI_ARRAY_PARAM(*encoded_size)]) { + BrotliEncoderState* s; + size_t out_size = *encoded_size; + const uint8_t* input_start = input_buffer; diff --git a/app-emulation/xen-tools/files/xen-tools-4.15.1-edk2-python3.9.patch b/app-emulation/xen-tools/files/xen-tools-4.15.1-edk2-python3.9.patch new file mode 100644 index 000000000000..a1f8d155434e --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-4.15.1-edk2-python3.9.patch @@ -0,0 +1,26 @@ +diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py +index ad556710802e..4be7957138a5 100755 +--- a/BaseTools/Source/Python/Common/Misc.py ++++ b/BaseTools/Source/Python/Common/Misc.py +@@ -1635,7 +1635,7 @@ def __init__(self, PeFile): + ByteArray = array.array('B')
+ ByteArray.fromfile(PeObject, 4)
+ # PE signature should be 'PE\0\0'
+- if ByteArray.tostring() != b'PE\0\0':
++ if ByteArray.tolist() != [ord('P'), ord('E'), 0, 0]:
+ self.ErrorInfo = self.FileName + ' has no valid PE signature PE00'
+ return
+
+diff --git a/BaseTools/Source/Python/AutoGen/UniClassObject.py b/BaseTools/Source/Python/AutoGen/UniClassObject.py +index b2895f7e5c63..883c2356e0ca 100644 +--- a/BaseTools/Source/Python/AutoGen/UniClassObject.py ++++ b/BaseTools/Source/Python/AutoGen/UniClassObject.py +@@ -152,7 +152,7 @@ def encode(self, input, errors='strict'): +
+ TheUcs2Codec = Ucs2Codec()
+ def Ucs2Search(name):
+- if name == 'ucs-2':
++ if name in ['ucs-2', 'ucs_2']:
+ return codecs.CodecInfo(
+ name=name,
+ encode=TheUcs2Codec.encode,
|