Skip to content

Fix compilation with non glibc.#21943

Merged
opencv-pushbot merged 2 commits intoopencv:3.4from
vrabaud:3.4_proc
May 5, 2022
Merged

Fix compilation with non glibc.#21943
opencv-pushbot merged 2 commits intoopencv:3.4from
vrabaud:3.4_proc

Conversation

@vrabaud
Copy link
Copy Markdown
Contributor

@vrabaud vrabaud commented May 2, 2022

_SC_NPROCESSORS_ONLN is non standard as defined on https://man7.org/linux/man-pages/man3/sysconf.3.html
It seems to only be on glibc, cf https://www.gnu.org/software/libc/manual/html_node/Processor-Resources.html

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work

Copy link
Copy Markdown
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@opencv-pushbot opencv-pushbot added this to the 3.4.18 milestone May 5, 2022
@opencv-pushbot opencv-pushbot merged commit 667e5e4 into opencv:3.4 May 5, 2022
@vrabaud vrabaud deleted the 3.4_proc branch May 5, 2022 09:21
liuxingbaoyu pushed a commit to liuxingbaoyu/opencv that referenced this pull request May 9, 2022
* Fix compilation with non glibc.

_SC_NPROCESSORS_ONLN is non standard as defined on https://man7.org/linux/man-pages/man3/sysconf.3.html
It seems to only be on glibc, cf https://www.gnu.org/software/libc/manual/html_node/Processor-Resources.html

* Fix to defined(_SC_NPROCESSORS_ONLN)
@opencv-pushbot opencv-pushbot mentioned this pull request May 14, 2022
@alalek alalek mentioned this pull request Aug 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants