From 8242c647b9d31320757363b69e7048a109ce86df Mon Sep 17 00:00:00 2001 From: Julian Waters Date: Mon, 26 Jun 2023 05:38:04 +0000 Subject: [PATCH] 8310863: Build failure after JDK- 8305341 Reviewed-by: dholmes --- .../windows/native/libprefs/WindowsPreferences.c | 7 +++---- src/java.security.jgss/share/native/libj2gss/GSSLibStub.c | 4 +--- .../share/native/libjdwp/ArrayReferenceImpl.c | 6 ++---- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/java.prefs/windows/native/libprefs/WindowsPreferences.c b/src/java.prefs/windows/native/libprefs/WindowsPreferences.c index adcf7491dae..939a24651af 100644 --- a/src/java.prefs/windows/native/libprefs/WindowsPreferences.c +++ b/src/java.prefs/windows/native/libprefs/WindowsPreferences.c @@ -23,7 +23,6 @@ * questions. */ -#include #include #include #include "jni.h" @@ -50,7 +49,7 @@ Java_java_util_prefs_WindowsPreferences_WindowsRegOpenKey(JNIEnv* env, int errorCode = RegOpenKeyEx((HKEY) hKey, str, 0, securityMask, &handle); (*env)->ReleaseByteArrayElements(env, lpSubKey, str, 0); - alignas(8) jlong tmp[2]; + _Alignas(8) jlong tmp[2]; tmp[0] = (jlong) handle; tmp[1] = errorCode; jlongArray result = (*env)->NewLongArray(env, 2); @@ -79,7 +78,7 @@ Java_java_util_prefs_WindowsPreferences_WindowsRegCreateKeyEx(JNIEnv* env, NULL, &handle, &lpdwDisposition); (*env)->ReleaseByteArrayElements(env, lpSubKey, str, 0); - alignas(8) jlong tmp[3]; + _Alignas(8) jlong tmp[3]; tmp[0] = (jlong) handle; tmp[1] = errorCode; tmp[2] = lpdwDisposition; @@ -197,7 +196,7 @@ Java_java_util_prefs_WindowsPreferences_WindowsRegQueryInfoKey(JNIEnv* env, &valuesNumber, &maxValueNameLength, NULL, NULL, NULL); - alignas(8) jlong tmp[5]; + _Alignas(8) jlong tmp[5]; tmp[0] = subKeysNumber; tmp[1] = errorCode; tmp[2] = valuesNumber; diff --git a/src/java.security.jgss/share/native/libj2gss/GSSLibStub.c b/src/java.security.jgss/share/native/libj2gss/GSSLibStub.c index 9a204f86a2f..b0862bed690 100644 --- a/src/java.security.jgss/share/native/libj2gss/GSSLibStub.c +++ b/src/java.security.jgss/share/native/libj2gss/GSSLibStub.c @@ -23,8 +23,6 @@ * questions. */ -#include - #include "sun_security_jgss_wrapper_GSSLibStub.h" #include "NativeUtil.h" #include "NativeFunc.h" @@ -1191,7 +1189,7 @@ Java_sun_security_jgss_wrapper_GSSLibStub_inquireContext(JNIEnv *env, OM_uint32 flags; int isInitiator, isEstablished; #if defined (_WIN32) && defined (_MSC_VER) - alignas(8) + _Alignas(8) #endif jlong result[6]; jlongArray jresult; diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/ArrayReferenceImpl.c b/src/jdk.jdwp.agent/share/native/libjdwp/ArrayReferenceImpl.c index cc7b42f6570..9f3680c4255 100644 --- a/src/jdk.jdwp.agent/share/native/libjdwp/ArrayReferenceImpl.c +++ b/src/jdk.jdwp.agent/share/native/libjdwp/ArrayReferenceImpl.c @@ -23,8 +23,6 @@ * questions. */ -#include - #include "util.h" #include "ArrayReferenceImpl.h" #include "inStream.h" @@ -418,7 +416,7 @@ readLongComponents(JNIEnv *env, PacketInputStream *in, { int i; #if defined (_WIN32) && defined (_MSC_VER) - alignas(8) + _Alignas(8) #endif jlong component; @@ -449,7 +447,7 @@ readDoubleComponents(JNIEnv *env, PacketInputStream *in, { int i; #if defined (_WIN32) && defined (_MSC_VER) - alignas(8) + _Alignas(8) #endif jdouble component;