KEMBAR78
mallinfo is only defined on glibc and android by jvoisin · Pull Request #764 · uxlfoundation/oneTBB · GitHub
Skip to content

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

@alex-katranov alex-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!

@alex-katranov alex-katranov merged commit 3a7f96d into uxlfoundation: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