Skip to content

Commit e3212e7

Browse files
[libc] fix overlay build problems
1 parent 1466198 commit e3212e7

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

libc/src/__support/OSUtil/linux/vdso.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include "src/__support/threads/callonce.h"
1212
#include "src/__support/threads/linux/futex_word.h"
1313
#include "src/errno/libc_errno.h"
14-
#include "src/sys/auxv/getauxval.h"
1514
#include <linux/auxvec.h>
1615
#include <linux/elf.h>
1716

@@ -24,6 +23,12 @@
2423
#endif
2524

2625
namespace LIBC_NAMESPACE {
26+
27+
// we don't include getauxval.h as it may forcibly pull in elf.h (via
28+
// sys/auxv.h) in overlay mode instead, we provide a separate declaration for
29+
// getauxval
30+
unsigned long getauxval(unsigned long id);
31+
2732
namespace vdso {
2833

2934
// See https://refspecs.linuxfoundation.org/LSB_1.3.0/gLSB/gLSB/symverdefs.html

libc/test/src/__support/OSUtil/linux/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ add_libc_test(
88
SRCS vdso_test.cpp
99
DEPENDS
1010
libc.src.__support.OSUtil.vdso
11-
libc.include.llvm-libc-types.struct_timeval # TODO: update this to proxy header once available
11+
libc.hdr.types.struct_timeval
1212
)

libc/test/src/__support/OSUtil/linux/vdso_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "llvm-libc-types/struct_timeval.h"
9+
#include "hdr/types/struct_timeval.h"
1010
#include "src/__support/OSUtil/vdso.h"
1111
#include "test/UnitTest/Test.h"
1212

0 commit comments

Comments
 (0)