]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Fix blas support on osx
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 22 Jul 2020 13:38:46 +0000 (14:38 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 22 Jul 2020 13:39:06 +0000 (14:39 +0100)
src/libutil/util.c

index 60328df328866d9e7241df1f41f0ad75a5143fdd..19f07e82d1c40c32f9708d68f5369b08914e25a9 100644 (file)
@@ -1709,8 +1709,13 @@ void rspamd_gerror_free_maybe (gpointer p)
 #ifdef HAVE_CBLAS_H
 #include "cblas.h"
 #else
+#ifdef __APPLE__
+/* OSX is pure evil: number of threads must be set via env: VECLIB_MAXIMUM_THREADS */
+void openblas_set_num_threads(int num_threads) {}
+#else
 extern void openblas_set_num_threads(int num_threads);
 #endif
+#endif
 /*
  * Openblas creates threads that are not supported by
  * jemalloc allocator (aside of being bloody stupid). So this hack