From 7f4caf2ad5e4bcc0c4a88b906b8a09e2f2dd4281 Mon Sep 17 00:00:00 2001 From: Huidae Cho Date: Sat, 22 Feb 2025 19:35:27 -0700 Subject: [PATCH] quicksort.h: Use rand() on Windows --- include/grass/iostream/quicksort.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grass/iostream/quicksort.h b/include/grass/iostream/quicksort.h index c5a9fc779c2..d95a429dbcf 100644 --- a/include/grass/iostream/quicksort.h +++ b/include/grass/iostream/quicksort.h @@ -56,7 +56,7 @@ void partition(T *data, size_t n, size_t &pivot, CMPR &cmp) // Try to get a good partition value and avoid being bitten by already // sorted input. // ptpart = data + (random() % n); -#ifdef __MINGW32__ +#ifdef _WIN32 ptpart = data + (rand() % n); #else ptpart = data + (random() % n);