From 45858c0a7838ee1b620eb4fd9210e1e0b84b6b4d Mon Sep 17 00:00:00 2001 From: Lefteris Karapetsas Date: Mon, 15 Jun 2015 13:28:58 +0200 Subject: [PATCH] OpenCL in MacosX does not like static variables Should fix #2172 --- libethash-cl/ethash_cl_miner.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libethash-cl/ethash_cl_miner.cpp b/libethash-cl/ethash_cl_miner.cpp index 6c2f8269a..b160cdd94 100644 --- a/libethash-cl/ethash_cl_miner.cpp +++ b/libethash-cl/ethash_cl_miner.cpp @@ -429,7 +429,8 @@ void ethash_cl_miner::search(uint8_t const* header, uint64_t target, search_hook }; queue pending; - static uint32_t const c_zero = 0; + // this can't be a static because in MacOSX OpenCL implementation a segfault occurs when a static is passed to OpenCL functions + uint32_t const c_zero = 0; // update header constant buffer m_queue.enqueueWriteBuffer(m_header, false, 0, 32, header);