Skip to content

Commit f954247

Browse files
authored
[cxx-interop] Update test for foreign reference types
On Linux, both the C++ stdlib (libstdc++) and the C stdlib (glibc) have a header called `stdlib.h`. This test is failing while I am restructuring Glibc/libstdc++ modulemaps on Linux. Besides, the tests that use the C++ stdlib reside in the `Cxx/stdlib` directory. Let's fix that by including the C header and not the C++ header.
1 parent 295ec46 commit f954247

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/Interop/Cxx/foreign-reference/Inputs/move-only.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#ifndef TEST_INTEROP_CXX_FOREIGN_REFERENCE_INPUTS_MOVE_ONLY_H
22
#define TEST_INTEROP_CXX_FOREIGN_REFERENCE_INPUTS_MOVE_ONLY_H
33

4-
#include <stdlib.h>
4+
#include <stddef.h> // for size_t
55

66
#include "visibility.h"
77

8+
void* malloc(size_t size);
89
inline void *operator new(size_t, void *p) { return p; }
910

1011
template <class _Tp>

0 commit comments

Comments
 (0)