summaryrefslogtreecommitdiff
path: root/libs/pbd/test
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-02-23 22:55:17 +0100
committerRobin Gareus <robin@gareus.org>2016-02-23 22:55:17 +0100
commit0e36f8e2d7d65413730947084677628e44c61608 (patch)
tree620f12bea4f28d57b0d05294233d5f7e29b84279 /libs/pbd/test
parentbb79b63c93ba6d2951deb85591b032227e283637 (diff)
missing include for rand() in self-tests
Diffstat (limited to 'libs/pbd/test')
-rw-r--r--libs/pbd/test/reallocpool_test.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/libs/pbd/test/reallocpool_test.cc b/libs/pbd/test/reallocpool_test.cc
index 7016d05d5d..6e6d6150ef 100644
--- a/libs/pbd/test/reallocpool_test.cc
+++ b/libs/pbd/test/reallocpool_test.cc
@@ -1,4 +1,5 @@
#include <string.h>
+#include <stdlib.h>
#include "reallocpool_test.h"
#include "pbd/reallocpool.h"
@@ -13,15 +14,15 @@ ReallocPoolTest::ReallocPoolTest ()
void
ReallocPoolTest::testBasic ()
{
- srand (0);
+ ::srand (0);
PBD::ReallocPool *m = new PBD::ReallocPool("TestPool", 256 * 1024);
for (int l = 0; l < 2 * 1024 * 1024; ++l) {
void *x[32];
size_t s[32];
- int cnt = rand() % 32;
+ int cnt = ::rand() % 32;
for (int i = 0; i < cnt; ++i) {
- s[i] = rand() % 1024;
+ s[i] = ::rand() % 1024;
x[i] = m->malloc (s[i]);
}
for (int i = 0; i < cnt; ++i) {