modules/core/src/parallel.cpp : Needs extra include file for __linux__ compilation (Bug #2445)


Added by Martin Andrews over 12 years ago. Updated over 12 years ago.


Status:Done Start date:2012-10-16
Priority:Normal Due date:
Assignee:Andrey Kamaev % Done:

0%

Category:build/install
Target version:2.4.3
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

In the new "int cv::getNumberOfCPUs(void)" function, your call on __linux__ systems to 'sysconf(_SC_NPROCESSORS_ONLN)' requires an additional conditional inclusion :

#if defined __linux__
#include <unistd.h>
#endif

Once this is added to the file (quick fix on my part - maybe it should be tucked into another header file) the source builds cleanly again.

Hope this helps
Martin
:-)


Associated revisions

Revision 7173c823
Added by Andrey Kamaev over 12 years ago

Include unistd.h to parallel.cpp on UNIX-like systems

This fixes build without TBB and CUDA. Issue #2445

Revision 229aa623
Added by Andrey Pavlenko about 11 years ago

Merge pull request #2445 from ilya-lavrenov:ocl_perf

History

Updated by Andrey Kamaev over 12 years ago

  • Assignee deleted (Andrey Kamaev)

Updated by Vadim Pisarevsky over 12 years ago

looks like it has been fixed in 2.4 branch

  • Target version set to 2.4.3
  • Status changed from Open to Done
  • Assignee set to Andrey Kamaev

Also available in: Atom PDF