Fix the following error for ocl::getOpenCLPlatforms() on Ubuntu 12.04 with gcc 4.8
OpenCV Error: Unknown error code -6 (OpenCL function is not available: [clGetPlatformIDs]) in opencl_check_fn, file /home/ahb/software/opencv/modules/ocl/src/cl_runtime/cl_runtime.cpp, line 83 The issue results from modules/ocl/src/cl_runtime/cl_runtime.cpp checking for "linux" instead of "__linux__" (cp. http://sourceforge.net/p/predef/wiki/OperatingSystems/) Adjust all other occurrences of "defined(linux)" as well.
This commit is contained in:
parent
9628abc786
commit
49dfa5a17f
2
3rdparty/include/opencl/1.2/CL/cl.hpp
vendored
2
3rdparty/include/opencl/1.2/CL/cl.hpp
vendored
@ -210,7 +210,7 @@
|
||||
#include <string>
|
||||
#endif
|
||||
|
||||
#if defined(linux) || defined(__APPLE__) || defined(__MACOSX)
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__MACOSX)
|
||||
#include <alloca.h>
|
||||
|
||||
#include <emmintrin.h>
|
||||
|
@ -45,7 +45,7 @@
|
||||
#define CV_CL_GET_PROC_ADDRESS(name) WinGetProcAddress(name)
|
||||
#endif // _WIN32
|
||||
|
||||
#if defined(linux)
|
||||
#if defined(__linux__)
|
||||
#include <dlfcn.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
#define CV_CL_GET_PROC_ADDRESS(name) WinGetProcAddress(name)
|
||||
#endif // _WIN32
|
||||
|
||||
#if defined(linux)
|
||||
#if defined(__linux__)
|
||||
#include <dlfcn.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
#define CV_CL_GET_PROC_ADDRESS(name) WinGetProcAddress(name)
|
||||
#endif // _WIN32
|
||||
|
||||
#if defined(linux)
|
||||
#if defined(__linux__)
|
||||
#include <dlfcn.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
#define CV_CL_GET_PROC_ADDRESS(name) WinGetProcAddress(name)
|
||||
#endif // _WIN32
|
||||
|
||||
#if defined(linux)
|
||||
#if defined(__linux__)
|
||||
#include <dlfcn.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
#define CV_CL_GET_PROC_ADDRESS(name) WinGetProcAddress(name)
|
||||
#endif // _WIN32
|
||||
|
||||
#if defined(linux)
|
||||
#if defined(__linux__)
|
||||
#include <dlfcn.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user