summaryrefslogtreecommitdiff
path: root/libc/malloc_hooks/tests/malloc_hooks_tests.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2017-05-23 15:53:36 -0700
committerElliott Hughes <enh@google.com>2017-05-23 15:53:36 -0700
commit8543f923fe46b958e5061dab6d0440c9e2cd7603 (patch)
tree1584013cdea9884316239b3f4a5606066b5b613c /libc/malloc_hooks/tests/malloc_hooks_tests.cpp
parent4767bc4a6cebc2ad4c61cccdf92290e17227a792 (diff)
Stop including <sys/sysmacros.h> from <sys/types.h>.
<sys/types.h> unconditionally includes <sys/sysmacros.h>. <sys/sysmacros.h> defines major, minor, and makedev. In the deprecated NDK headers, these were inline functions. In the unified headers, they are function-like macros. The inline functions would only collide with another function called major, minor, or makedev but the macros will replace anything with a function-like form such as definitions of class methods called major, minor, or makedev. This causes code which has such definitions to fail to compile when moving from the deprecated headers to the unified headers. Resolve this by removing the transitive dependency. Folks who want <sys/sysmacros.h> can ask for it explicitly (it's been in both bionic and glibc for years, though I don't think macOS has it [as usual]). Bug: https://github.com/android-ndk/ndk/issues/398 Test: builds Change-Id: If2921c7b5d979c3066f199f22c64d4d2f7bf6632
Diffstat (limited to 'libc/malloc_hooks/tests/malloc_hooks_tests.cpp')
0 files changed, 0 insertions, 0 deletions