[PATCH] Make connect-stress test compile for win32

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 src/tests/connect-stress.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/tests/connect-stress.c b/src/tests/connect-stress.c
index 5476675..eadcf88 100644
--- a/src/tests/connect-stress.c
+++ b/src/tests/connect-stress.c
@@ -118,7 +118,7 @@ static void stream_write_callback(pa_stream *stream, size_t nbytes, void *userda
     memset(silence, 0, sizeof(silence));
 
     while (nbytes) {
-        int n = MIN(sizeof(silence), nbytes);
+        int n = PA_MIN(sizeof(silence), nbytes);
         pa_stream_write(stream, silence, n, NULL, 0, 0);
         nbytes -= n;
     }
@@ -195,9 +195,9 @@ int main(int argc, char *argv[]) {
 
     for (i = 0; i < NTESTS; i++) {
         connect(argv[0], &i);
-        usleep(random() % 500000);
+        usleep(rand() % 500000);
         disconnect();
-        usleep(random() % 500000);
+        usleep(rand() % 500000);
     }
 
     fprintf(stderr, "Done.\n");
-- 
1.7.1




[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux