From a8fa3ca5cf312852a691f8fda989c8b3cf772520 Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Mon, 4 Jan 2021 21:13:49 +0100 Subject: [PATCH] Use correct native types with "alignas(1)". --- src/p_unix.h | 10 +++++----- src/p_vmlinx.cpp | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/p_unix.h b/src/p_unix.h index ce4d3d06..53793c4a 100644 --- a/src/p_unix.h +++ b/src/p_unix.h @@ -93,8 +93,8 @@ protected: // must agree with stub/linux.hh __packed_struct(b_info) // 12-byte header before each compressed block - unsigned sz_unc; // uncompressed_size - unsigned sz_cpr; // compressed_size + NE32 sz_unc; // uncompressed_size + NE32 sz_cpr; // compressed_size unsigned char b_method; // compression algorithm unsigned char b_ftid; // filter id unsigned char b_cto8; // filter parameter @@ -110,9 +110,9 @@ protected: __packed_struct_end() __packed_struct(p_info) // 12-byte packed program header - unsigned p_progid; - unsigned p_filesize; - unsigned p_blocksize; + NE32 p_progid; + NE32 p_filesize; + NE32 p_blocksize; __packed_struct_end() struct l_info linfo; diff --git a/src/p_vmlinx.cpp b/src/p_vmlinx.cpp index 5bee9caf..cc57fc4f 100644 --- a/src/p_vmlinx.cpp +++ b/src/p_vmlinx.cpp @@ -318,13 +318,13 @@ void PackVmlinuxBase::pack(OutputFile *fo) throwInternalError("Ehdr compression failed"); __packed_struct(b_info) // 12-byte header before each compressed block - unsigned sz_unc; // uncompressed_size - unsigned sz_cpr; // compressed_size + NE32 sz_unc; // uncompressed_size + NE32 sz_cpr; // compressed_size unsigned char b_method; // compression algorithm unsigned char b_ftid; // filter id unsigned char b_cto8; // filter parameter unsigned char b_unused; // FIXME: !=0 for partial-block unfilter - // unsigned f_offset, f_len; // only if partial-block unfilter + // NE32 f_offset, f_len; // only if partial-block unfilter __packed_struct_end() struct b_info hdr_info;