diff --git a/make/modules/java.desktop/lib/AwtLibraries.gmk b/make/modules/java.desktop/lib/AwtLibraries.gmk index 4d18038f2aac3..357ca30d376d7 100644 --- a/make/modules/java.desktop/lib/AwtLibraries.gmk +++ b/make/modules/java.desktop/lib/AwtLibraries.gmk @@ -220,10 +220,14 @@ ifeq ($(call isTargetOs, windows macosx)+$(ENABLE_HEADLESS_ONLY), false+false) common/font \ common/java2d/opengl \ common/java2d/x11 \ - libpipewire/include \ java.base:libjvm \ # + # exclude pipewire from the AIX build, no Wayland support + ifeq ($(call isTargetOs, aix), false) + LIBAWT_XAWT_EXTRA_HEADER_DIRS += libpipewire/include + endif + ifeq ($(call isTargetOs, linux), true) ifeq ($(DISABLE_XRENDER), true) LIBAWT_XAWT_CFLAGS += -DDISABLE_XRENDER_BY_DEFAULT=true diff --git a/src/java.desktop/unix/native/libawt_xawt/awt/screencast_pipewire.c b/src/java.desktop/unix/native/libawt_xawt/awt/screencast_pipewire.c index 09585964ac8b8..62d9e35817396 100644 --- a/src/java.desktop/unix/native/libawt_xawt/awt/screencast_pipewire.c +++ b/src/java.desktop/unix/native/libawt_xawt/awt/screencast_pipewire.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,6 +30,8 @@ #include #include "jni_util.h" #include "awt.h" + +#ifndef _AIX #include "screencast_pipewire.h" struct pw_buffer *(*fp_pw_stream_dequeue_buffer)(struct pw_stream *stream); @@ -1095,3 +1097,28 @@ JNIEXPORT jint JNICALL Java_sun_awt_screencast_ScreencastHelper_getRGBPixelsImpl releaseToken(env, jtoken, token); return 0; } +#else +JNIEXPORT void JNICALL +Java_sun_awt_screencast_ScreencastHelper_closeSession(JNIEnv *env, jclass cls) { +} + +JNIEXPORT jint JNICALL Java_sun_awt_screencast_ScreencastHelper_getRGBPixelsImpl( + JNIEnv *env, + jclass cls, + jint jx, + jint jy, + jint jwidth, + jint jheight, + jintArray pixelArray, + jintArray affectedScreensBoundsArray, + jstring jtoken +) { + return -1; /* RESULT_ERROR */ +} + +JNIEXPORT jboolean JNICALL Java_sun_awt_screencast_ScreencastHelper_loadPipewire( + JNIEnv *env, jclass cls, jboolean screencastDebug +) { + return JNI_FALSE; +} +#endif diff --git a/src/java.desktop/unix/native/libawt_xawt/awt/screencast_portal.c b/src/java.desktop/unix/native/libawt_xawt/awt/screencast_portal.c index 92342aa13be90..4d99b90ba08d9 100644 --- a/src/java.desktop/unix/native/libawt_xawt/awt/screencast_portal.c +++ b/src/java.desktop/unix/native/libawt_xawt/awt/screencast_portal.c @@ -29,7 +29,10 @@ #include #include #include + +#ifndef _AIX #include "screencast_pipewire.h" + #include "screencast_portal.h" extern volatile bool isGtkMainThread; @@ -925,3 +928,4 @@ int getPipewireFd(const gchar *token, DEBUG_SCREENCAST("pwFd %i\n", pipewireFd); return pipewireFd; } +#endif diff --git a/src/java.desktop/unix/native/libpipewire/include/spa/utils/endian.h b/src/java.desktop/unix/native/libpipewire/include/spa/utils/endian.h index 0a8f62c73ce7a..2d002d4538c30 100644 --- a/src/java.desktop/unix/native/libpipewire/include/spa/utils/endian.h +++ b/src/java.desktop/unix/native/libpipewire/include/spa/utils/endian.h @@ -18,10 +18,6 @@ #define bswap_16 _byteswap_ushort #define bswap_32 _byteswap_ulong #define bswap_64 _byteswap_uint64 -#elif defined(AIX) -#include -#define __BIG_ENDIAN BIG_ENDIAN -#define __BYTE_ORDER BIG_ENDIAN #else #include #include