Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mallinfo is only defined on glibc and android #764

Merged
merged 1 commit into from
Feb 7, 2022
Merged

mallinfo is only defined on glibc and android #764

merged 1 commit into from
Feb 7, 2022

Conversation

jvoisin
Copy link
Contributor

@jvoisin jvoisin commented Feb 2, 2022

Description

The fact that the mallinfo structure isn't defined in musl means that it doesn't compile there:

[ 90%] Building CXX object src/tbbmalloc_proxy/CMakeFiles/tbbmalloc_proxy.dir/proxy.cpp.o
/__w/mimalloc-bench/mimalloc-bench/extern/tbb/src/tbbmalloc_proxy/proxy.cpp:263:26: error: return type 'struct mallinfo' is incomplete
  263 | struct mallinfo mallinfo() __THROW
      |                          ^
compilation terminated due to -Wfatal-errors.

Type of change

  • bug fix - change that fixes an issue
  • new feature - change that adds functionality
  • tests - change in tests
  • infrastructure - change in infrastructure and CI
  • documentation - documentation update

Tests

  • added - required for new features and some bug fixes
  • not needed

Documentation

  • updated in # - add PR number
  • needs to be updated
  • not needed

Breaks backward compatibility

  • Yes
  • No
  • Unknown

Notify the following users

Other information

It currently prevents compilation under musl:

```
[ 90%] Building CXX object src/tbbmalloc_proxy/CMakeFiles/tbbmalloc_proxy.dir/proxy.cpp.o
/__w/mimalloc-bench/mimalloc-bench/extern/tbb/src/tbbmalloc_proxy/proxy.cpp:263:26: error: return type 'struct mallinfo' is incomplete
  263 | struct mallinfo mallinfo() __THROW
      |                          ^
compilation terminated due to -Wfatal-errors.
``
Copy link
Contributor

@alexey-katranov alexey-katranov left a comment

Choose a reason for hiding this comment

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

Indeed, mallinfo is not a part of POSIX. Thank you for the patch!

@alexey-katranov alexey-katranov merged commit 3a7f96d into oneapi-src:master Feb 7, 2022
@jvoisin jvoisin deleted the patch-1 branch February 7, 2022 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants