Commit 5d446248 authored by Andrew Gallagher's avatar Andrew Gallagher Committed by Facebook GitHub Bot

Fix demangle bug

Summary:
Avoid a forward declaration mismatch between `libiberty.h` and
`libgen.h` that dirs in modular builds (likely related to T35368090).
This defines `HAVE_DECL_BASENAME`, which is normally defined
in the `config.h` generated during the binutils build, to prevent this
conflicting declaration.

Reviewed By: igorsugak

Differential Revision: D20600924

fbshipit-source-id: 0fb6287719abb3cf52d7eda457efbe567985d1d4
parent 6d97401b
......@@ -23,7 +23,11 @@
// So we extract the inclusion of `<demangle.h>` which includes `<libiberty.h>`
// to here, isolating it.
#if FOLLY_DETAIL_HAVE_DEMANGLE_H
// Work around an issue with conflicting `basename` definitions in glibc and
// binutils headers.
#define HAVE_DECL_BASENAME 1
#include <demangle.h> // @manual
#undef HAVE_DECL_BASENAME
#endif
namespace folly {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment