diff --git a/test/jdk/java/foreign/nested/libNested.c b/test/jdk/java/foreign/nested/libNested.c index a1414d6ed61..c31fb0dc4cc 100644 --- a/test/jdk/java/foreign/nested/libNested.c +++ b/test/jdk/java/foreign/nested/libNested.c @@ -26,6 +26,9 @@ #else #define EXPORT #endif +#ifdef _AIX +#pragma align (natural) +#endif struct S1{ double f0; long long f1; double f2; int f3; }; union U1{ short f0; long long f1; short f2; char f3[4][3]; }; @@ -92,3 +95,7 @@ EXPORT struct S13 test_S13(struct S13 arg, struct S13(*cb)(struct S13)) { return EXPORT struct S14 test_S14(struct S14 arg, struct S14(*cb)(struct S14)) { return cb(arg); } EXPORT union U16 test_U16(union U16 arg, union U16(*cb)(union U16)) { return cb(arg); } EXPORT struct S15 test_S15(struct S15 arg, struct S15(*cb)(struct S15)) { return cb(arg); } + +#ifdef _AIX +#pragma align (reset) +#endif diff --git a/test/jdk/java/foreign/shared.h b/test/jdk/java/foreign/shared.h index 1cadc1075d6..0f6183891a7 100644 --- a/test/jdk/java/foreign/shared.h +++ b/test/jdk/java/foreign/shared.h @@ -34,6 +34,9 @@ #else #define EXPORT #endif +#ifdef _AIX +#pragma align (natural) +#endif struct S_I { int p0; }; struct S_F { float p0; }; @@ -120,3 +123,7 @@ struct S_PPF { void* p0; void* p1; float p2; }; struct S_PPD { void* p0; void* p1; double p2; }; struct S_PPP { void* p0; void* p1; void* p2; }; struct S_FFFF { float p0; float p1; float p2; float p3; }; + +#ifdef _AIX +#pragma align (reset) +#endif