Skip to content
Snippets Groups Projects
Commit 95b2be84 authored by Marek Vavrusa's avatar Marek Vavrusa
Browse files

Compatibility for OS X, as it allocates 16-bytes aligned memory as default.

parent 8ddf9c1d
No related branches found
No related tags found
No related merge requests found
......@@ -79,7 +79,11 @@ double tls_rand()
}
/* Initialize PRNG state. */
#ifdef __APPLE__
s = malloc(sizeof(dsfmt_t));
#else
s = memalign(16, sizeof(dsfmt_t));
#endif
if (s == NULL) {
fprintf(stderr, "error: PRNG: not enough memory\n");
return .0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment