aboutsummaryrefslogtreecommitdiff
path: root/dep
diff options
context:
space:
mode:
Diffstat (limited to 'dep')
-rw-r--r--dep/CMakeLists.txt2
-rw-r--r--dep/SFMT/SFMT-hotfix1.diff14
-rw-r--r--dep/SFMT/SFMT.h3
3 files changed, 17 insertions, 2 deletions
diff --git a/dep/CMakeLists.txt b/dep/CMakeLists.txt
index 2b3796fb2fa..f829956b7bf 100644
--- a/dep/CMakeLists.txt
+++ b/dep/CMakeLists.txt
@@ -32,10 +32,10 @@ endif()
if(SERVERS OR TOOLS)
add_subdirectory(g3dlite)
add_subdirectory(recastnavigation)
+ add_subdirectory(cppformat)
endif()
if(SERVERS)
- add_subdirectory(cppformat)
add_subdirectory(gsoap)
endif()
diff --git a/dep/SFMT/SFMT-hotfix1.diff b/dep/SFMT/SFMT-hotfix1.diff
new file mode 100644
index 00000000000..ba7810dc100
--- /dev/null
+++ b/dep/SFMT/SFMT-hotfix1.diff
@@ -0,0 +1,14 @@
+diff --git a/dep/SFMT/SFMT.h b/dep/SFMT/SFMT.h
+index 3d15d65..ccf21ce 100644
+--- a/dep/SFMT/SFMT.h
++++ b/dep/SFMT/SFMT.h
+@@ -173,7 +173,8 @@ public:
+ uint32_t statesize = SFMT_N*4; // Size of state vector
+
+ // Fill state vector with random numbers from seed
+- ((uint32_t*)state)[0] = y;
++ uint32_t* s = (uint32_t*)&state;
++ s[0] = y;
+ const uint32_t factor = 1812433253U;// Multiplication factor
+
+ for (i = 1; i < statesize; i++) {
diff --git a/dep/SFMT/SFMT.h b/dep/SFMT/SFMT.h
index 3d15d651e5b..ccf21cecd5f 100644
--- a/dep/SFMT/SFMT.h
+++ b/dep/SFMT/SFMT.h
@@ -173,7 +173,8 @@ public:
uint32_t statesize = SFMT_N*4; // Size of state vector
// Fill state vector with random numbers from seed
- ((uint32_t*)state)[0] = y;
+ uint32_t* s = (uint32_t*)&state;
+ s[0] = y;
const uint32_t factor = 1812433253U;// Multiplication factor
for (i = 1; i < statesize; i++) {