diff --git a/subprojects/libsignal-protocol-c.wrap b/subprojects/libsignal-protocol-c.wrap index 3a628479b..33ecdc29b 100644 --- a/subprojects/libsignal-protocol-c.wrap +++ b/subprojects/libsignal-protocol-c.wrap @@ -4,7 +4,7 @@ source_url = https://github.com/WhisperSystems/libsignal-protocol-c/archive/v2.3 source_filename = libsignal-protocol-c-2.3.3.tar.gz source_hash = c22e7690546e24d46210ca92dd808f17c3102e1344cd2f9a370136a96d22319d patch_directory = libsignal-protocol-c -diff_files = libsignal-protocol-c/dllexport.patch +diff_files = libsignal-protocol-c/dllexport.patch, libsignal-protocol-c/dllexport.patch [provide] dependency_names = libsignal-protocol-c diff --git a/subprojects/packagefiles/libsignal-protocol-c/src/meson.build b/subprojects/packagefiles/libsignal-protocol-c/src/meson.build index d696d2c48..48a57f6ac 100644 --- a/subprojects/packagefiles/libsignal-protocol-c/src/meson.build +++ b/subprojects/packagefiles/libsignal-protocol-c/src/meson.build @@ -105,7 +105,7 @@ include_directories = include_directories( 'curve25519/ed25519/nacl_includes', 'curve25519/ed25519/tests', ) -c_args = [] +c_args = ['-DBUILDING_SIGNAL'] public_c_args = [] if cc.has_function('SecureZeroMemory', prefix: '#include ') c_args += ['-DSECUREZEROMEMORY'] diff --git a/subprojects/packagefiles/libsignal-protocol-c/vla.patch b/subprojects/packagefiles/libsignal-protocol-c/vla.patch new file mode 100644 index 000000000..9a2ab34ff --- /dev/null +++ b/subprojects/packagefiles/libsignal-protocol-c/vla.patch @@ -0,0 +1,72 @@ +diff --git a/src/curve25519/ed25519/tests/internal_fast_tests.c b/src/curve25519/ed25519/tests/internal_fast_tests.c +index 6566e25..5e5db58 100644 +--- a/src/curve25519/ed25519/tests/internal_fast_tests.c ++++ b/src/curve25519/ed25519/tests/internal_fast_tests.c +@@ -27,6 +27,7 @@ + } \ + } while (0) + ++#define MSG_LEN 200 + + int sha512_fast_test(int silent) + { +@@ -293,7 +294,6 @@ int curvesigs_fast_test(int silent) + 0x0b, 0xd6, 0xc1, 0x97, 0x3f, 0x7d, 0x78, 0x0a, + 0xb3, 0x95, 0x18, 0x62, 0x68, 0x03, 0xd7, 0x82, + }; +- const int MSG_LEN = 200; + unsigned char privkey[32]; + unsigned char pubkey[32]; + unsigned char signature[64]; +@@ -333,7 +333,6 @@ int xeddsa_fast_test(int silent) + 0x69, 0xad, 0xa5, 0x76, 0xd6, 0x3d, 0xca, 0xf2, + 0xac, 0x32, 0x6c, 0x11, 0xd0, 0xb9, 0x77, 0x02, + }; +- const int MSG_LEN = 200; + unsigned char privkey[32]; + unsigned char pubkey[32]; + unsigned char signature[64]; +diff --git a/src/curve25519/ed25519/tests/internal_slow_tests.c b/src/curve25519/ed25519/tests/internal_slow_tests.c +index 740ddbe..af870e6 100644 +--- a/src/curve25519/ed25519/tests/internal_slow_tests.c ++++ b/src/curve25519/ed25519/tests/internal_slow_tests.c +@@ -26,6 +26,7 @@ + } \ + } while (0) + ++#define MSG_LEN 200 + + + int curvesigs_slow_test(int silent, int iterations) +@@ -43,7 +44,6 @@ int curvesigs_slow_test(int silent, int iterations) + }; + + int count; +- const int MSG_LEN = 200; + unsigned char privkey[32]; + unsigned char pubkey[32]; + unsigned char signature[64]; +@@ -110,7 +110,6 @@ int xeddsa_slow_test(int silent, int iterations) + }; + + int count; +- const int MSG_LEN = 200; + unsigned char privkey[32]; + unsigned char pubkey[32]; + unsigned char signature[96]; +@@ -177,7 +176,6 @@ int xeddsa_to_curvesigs_slow_test(int silent, int iterations) + }; + + int count; +- const int MSG_LEN = 200; + unsigned char privkey[32]; + unsigned char pubkey[32]; + unsigned char signature[96]; +@@ -294,7 +292,6 @@ int generalized_xveddsa_slow_test(int silent, int iterations) + */ + + int count; +- const int MSG_LEN = 200; + unsigned char privkey[32]; + unsigned char pubkey[32]; + unsigned char signature[96];