gcc 4.x fixes, found by tb

This commit is contained in:
sthen
2026-01-22 23:10:25 +00:00
parent f0839ac28b
commit 42e9867746
4 changed files with 52 additions and 0 deletions
+1
View File
@@ -1,6 +1,7 @@
COMMENT= library for network communications and cryptography
DISTNAME= libsodium-1.0.21
REVISION= 0
SHARED_LIBS += sodium 11.0 # 29.0
@@ -0,0 +1,17 @@
From 4a7692a7232005586c957c4e48dd6515bb5d3175 Mon Sep 17 00:00:00 2001
From: Frank Denis <github@pureftpd.org>
Date: Tue, 13 Jan 2026 23:00:25 +0100
Subject: [PATCH] Compatibility with gcc 4.x
Index: src/libsodium/crypto_ipcrypt/ipcrypt_aesni.c
--- src/libsodium/crypto_ipcrypt/ipcrypt_aesni.c.orig
+++ src/libsodium/crypto_ipcrypt/ipcrypt_aesni.c
@@ -308,7 +308,7 @@ pfx_set_bit(uint8_t ip16[16], const unsigned int bit_i
uint8_t mask = (uint8_t) -((bit_value & 1));
# if defined(__GNUC__) || defined(__clang__)
- __asm__ __volatile__("" : "+r"(mask)::);
+ __asm__ __volatile__("" : "+r"(mask) :);
# endif
ip16[byte_index] = (ip16[byte_index] & ~bit_mask) | (bit_mask & mask);
}
@@ -0,0 +1,17 @@
From 4a7692a7232005586c957c4e48dd6515bb5d3175 Mon Sep 17 00:00:00 2001
From: Frank Denis <github@pureftpd.org>
Date: Tue, 13 Jan 2026 23:00:25 +0100
Subject: [PATCH] Compatibility with gcc 4.x
Index: src/libsodium/crypto_ipcrypt/ipcrypt_armcrypto.c
--- src/libsodium/crypto_ipcrypt/ipcrypt_armcrypto.c.orig
+++ src/libsodium/crypto_ipcrypt/ipcrypt_armcrypto.c
@@ -340,7 +340,7 @@ pfx_set_bit(uint8_t ip16[16], const unsigned int bit_i
uint8_t mask = (uint8_t) -((bit_value & 1));
# if defined(__GNUC__) || defined(__clang__)
- __asm__ __volatile__("" : "+r"(mask)::);
+ __asm__ __volatile__("" : "+r"(mask) :);
# endif
ip16[byte_index] = (ip16[byte_index] & ~bit_mask) | (bit_mask & mask);
}
@@ -0,0 +1,17 @@
From 4a7692a7232005586c957c4e48dd6515bb5d3175 Mon Sep 17 00:00:00 2001
From: Frank Denis <github@pureftpd.org>
Date: Tue, 13 Jan 2026 23:00:25 +0100
Subject: [PATCH] Compatibility with gcc 4.x
Index: src/libsodium/crypto_ipcrypt/ipcrypt_soft.c
--- src/libsodium/crypto_ipcrypt/ipcrypt_soft.c.orig
+++ src/libsodium/crypto_ipcrypt/ipcrypt_soft.c
@@ -284,7 +284,7 @@ pfx_set_bit(uint8_t ip16[16], const unsigned int bit_i
uint8_t mask = (uint8_t) -((bit_value & 1));
#if defined(__GNUC__) || defined(__clang__)
- __asm__ __volatile__("" : "+r"(mask)::);
+ __asm__ __volatile__("" : "+r"(mask) :);
#endif
ip16[byte_index] = (ip16[byte_index] & ~bit_mask) | (bit_mask & mask);
}