From 23570097cfc35fa900d31130ecaac7fad046a23a Mon Sep 17 00:00:00 2001 From: John Reiser Date: Sun, 14 Jul 2019 13:39:09 -0700 Subject: [PATCH] MSVC barfs on {unsigned == long int) [because sizeof() is the same!] https://github.com/upx/upx/issues/283 modified: p_lx_elf.cpp --- src/p_lx_elf.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp index f1a7b78f..4605ec59 100644 --- a/src/p_lx_elf.cpp +++ b/src/p_lx_elf.cpp @@ -3842,7 +3842,7 @@ int PackLinuxElf32::pack2(OutputFile *fo, Filter &ft) if (ft.id < 0x40) { // FIXME: ?? ft.addvalue += asl_delta; } - if (delta == x.size) { // PT_LOAD[0] with ElfXX.Ehdr only + if ((off_t)delta == x.size) { // PT_LOAD[0] with ElfXX.Ehdr only // QBE backend - http://c9x.me/compile/ hdr_u_len = 0; // no fiddling necessary! // &ft arg to packExtent will be zero becaue (k != nk_f) @@ -3973,7 +3973,7 @@ int PackLinuxElf64::pack2(OutputFile *fo, Filter &ft) if (ft.id < 0x40) { // FIXME: ?? ft.addvalue += asl_delta; } - if (delta == x.size) { // PT_LOAD[0] with ElfXX.Ehdr only + if ((off_t)delta == x.size) { // PT_LOAD[0] with ElfXX.Ehdr only // QBE backend - http://c9x.me/compile/ hdr_u_len = 0; // no fiddling necessary! // &ft arg to packExtent will be zero becaue (k != nk_f)