From e221ba817041cf7aa2008e322b683bd53c6e6ffc Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Sat, 25 Apr 2015 06:12:41 +0000
Subject: [PATCH] It is an error in Clang to cast a pointer to a smaller size. 
 Since a thread ID is a pointer on at least FreeBSD, cast to uintmax_t instead
 of DWORD.

---
 src/sbbs3/main.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sbbs3/main.cpp b/src/sbbs3/main.cpp
index 50e03b58a6..5224db01e6 100644
--- a/src/sbbs3/main.cpp
+++ b/src/sbbs3/main.cpp
@@ -305,7 +305,7 @@ DLLEXPORT void DLLCALL sbbs_srand()
 	}
 	if(rd != sizeof(seed))
 #endif
-		seed = time32(NULL) ^ (DWORD)GetCurrentThreadId();
+		seed = time32(NULL) ^ (uintmax_t)GetCurrentThreadId();
 
  	srand(seed);
 	sbbs_random(10);	/* Throw away first number */
-- 
GitLab