miax: fix compilation errors under uClibc-ng and musl
[feed/telephony.git] / libs / libsrtp / patches / 1003_fix_mips_namespace_collision.patch
1 --- a/test/srtp_driver.c
2 +++ b/test/srtp_driver.c
3 @@ -341,7 +341,7 @@ main (int argc, char *argv[]) {
4 if (do_codec_timing) {
5 srtp_policy_t policy;
6 int ignore;
7 - double mips = mips_estimate(1000000000, &ignore);
8 + double mips_est = mips_estimate(1000000000, &ignore);
9
10 crypto_policy_set_rtp_default(&policy.rtp);
11 crypto_policy_set_rtcp_default(&policy.rtcp);
12 @@ -353,33 +353,33 @@ main (int argc, char *argv[]) {
13 policy.allow_repeat_tx = 0;
14 policy.next = NULL;
15
16 - printf("mips estimate: %e\n", mips);
17 + printf("mips estimate: %e\n", mips_est);
18
19 printf("testing srtp processing time for voice codecs:\n");
20 printf("codec\t\tlength (octets)\t\tsrtp instructions/second\n");
21 printf("G.711\t\t%d\t\t\t%e\n", 80,
22 - (double) mips * (80 * 8) /
23 + (double) mips_est * (80 * 8) /
24 srtp_bits_per_second(80, &policy) / .01 );
25 printf("G.711\t\t%d\t\t\t%e\n", 160,
26 - (double) mips * (160 * 8) /
27 + (double) mips_est * (160 * 8) /
28 srtp_bits_per_second(160, &policy) / .02);
29 printf("G.726-32\t%d\t\t\t%e\n", 40,
30 - (double) mips * (40 * 8) /
31 + (double) mips_est * (40 * 8) /
32 srtp_bits_per_second(40, &policy) / .01 );
33 printf("G.726-32\t%d\t\t\t%e\n", 80,
34 - (double) mips * (80 * 8) /
35 + (double) mips_est * (80 * 8) /
36 srtp_bits_per_second(80, &policy) / .02);
37 printf("G.729\t\t%d\t\t\t%e\n", 10,
38 - (double) mips * (10 * 8) /
39 + (double) mips_est * (10 * 8) /
40 srtp_bits_per_second(10, &policy) / .01 );
41 printf("G.729\t\t%d\t\t\t%e\n", 20,
42 - (double) mips * (20 * 8) /
43 + (double) mips_est * (20 * 8) /
44 srtp_bits_per_second(20, &policy) / .02 );
45 printf("Wideband\t%d\t\t\t%e\n", 320,
46 - (double) mips * (320 * 8) /
47 + (double) mips_est * (320 * 8) /
48 srtp_bits_per_second(320, &policy) / .01 );
49 printf("Wideband\t%d\t\t\t%e\n", 640,
50 - (double) mips * (640 * 8) /
51 + (double) mips_est * (640 * 8) /
52 srtp_bits_per_second(640, &policy) / .02 );
53 }
54