Package: m2crypto / 0.46.2-3

Metadata

Package Version Patches format
m2crypto 0.46.2-3 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
64 bit time_t on 32 bit.patch | (download)

tests/test_util.py | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 fix: allow 64-bit time_t on 32-bit systems in test_is32bit

Some modern 32-bit Linux systems (e.g. with glibc >= 2.34 or musl time64 ABI)
use 64-bit time_t by default when _TIME_BITS=64 is enabled. The original test
assumed time_t was always 32-bit on 32-bit architectures, which is no longer
true.

Relax the check to accept both 32-bit and 64-bit time_t values:

    self.assertIn(bit32, (32, 64))

This makes the test compatible with both legacy and time64 ABIs.

Signed-off-by: Haixiao Yan <haixiao.yan.cn@windriver.com>

correct struct packing on 32 bit.patch | (download)

src/M2Crypto/SSL/timeout.py | 24 20 + 4 - 0 !
1 file changed, 20 insertions(+), 4 deletions(-)

 fix: correct struct packing on 32-bit with _time_bits=64

On 32-bit platforms with glibc time64 ABI, time_t is 64-bit wide while
`long` remains 32-bit. This causes struct timeval to use two 64-bit fields
(tv_sec, tv_usec). The previous code incorrectly packed timeout as "ll",
leading to EINVAL in setsockopt(SO_RCVTIMEO).

Use "qq" instead when m2.time_t_bits() == 64 to match the actual ABI.

Fixes: https://todo.sr.ht/~mcepl/m2crypto/374
Signed-off-by: Haixiao Yan <haixiao.yan.cn@windriver.com>