diff --git a/SingleSource/Regression/C++/custom_section_members.cpp b/SingleSource/Regression/C++/custom_section_members.cpp --- a/SingleSource/Regression/C++/custom_section_members.cpp +++ b/SingleSource/Regression/C++/custom_section_members.cpp @@ -1,8 +1,13 @@ // Test that we can compile a simple class with members in a custom section. +#if defined(__APPLE__) +#define SECTNAME "__TEXT,__section" +#else +#define SECTNAME "section" +#endif struct A { - static int foo() __attribute__((section("section"))); - static void bar() __attribute__((section("section"))); + static int foo() __attribute__((section(SECTNAME))); + static void bar() __attribute__((section(SECTNAME))); }; int A::foo() { return 0; }