Skip to content

Commit 04dbfe9

Browse files
committed
8351277: Remove pipewire from AIX build
Backport-of: 6bc480358c80b0a1a94b5ca5f4b7ff2d84ce8e37
1 parent a49d1a0 commit 04dbfe9

File tree

4 files changed

+37
-6
lines changed

4 files changed

+37
-6
lines changed

make/modules/java.desktop/lib/AwtLibraries.gmk

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,14 @@ ifeq ($(call isTargetOs, windows macosx)+$(ENABLE_HEADLESS_ONLY), false+false)
216216
common/font \
217217
common/java2d/opengl \
218218
common/java2d/x11 \
219-
libpipewire/include \
220219
java.base:libjvm \
221220
#
222221

222+
# exclude pipewire from the AIX build, no Wayland support
223+
ifeq ($(call isTargetOs, aix), false)
224+
LIBAWT_XAWT_EXTRA_HEADER_DIRS += libpipewire/include
225+
endif
226+
223227
ifeq ($(call isTargetOs, linux), true)
224228
ifeq ($(DISABLE_XRENDER), true)
225229
LIBAWT_XAWT_CFLAGS += -DDISABLE_XRENDER_BY_DEFAULT=true

src/java.desktop/unix/native/libawt_xawt/awt/screencast_pipewire.c

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,8 @@
3030
#include <dlfcn.h>
3131
#include "jni_util.h"
3232
#include "awt.h"
33+
34+
#ifndef _AIX
3335
#include "screencast_pipewire.h"
3436
#include "fp_pipewire.h"
3537
#include <stdio.h>
@@ -1039,3 +1041,28 @@ JNIEXPORT jint JNICALL Java_sun_awt_screencast_ScreencastHelper_getRGBPixelsImpl
10391041
releaseToken(env, jtoken, token);
10401042
return 0;
10411043
}
1044+
#else
1045+
JNIEXPORT void JNICALL
1046+
Java_sun_awt_screencast_ScreencastHelper_closeSession(JNIEnv *env, jclass cls) {
1047+
}
1048+
1049+
JNIEXPORT jint JNICALL Java_sun_awt_screencast_ScreencastHelper_getRGBPixelsImpl(
1050+
JNIEnv *env,
1051+
jclass cls,
1052+
jint jx,
1053+
jint jy,
1054+
jint jwidth,
1055+
jint jheight,
1056+
jintArray pixelArray,
1057+
jintArray affectedScreensBoundsArray,
1058+
jstring jtoken
1059+
) {
1060+
return -1; /* RESULT_ERROR */
1061+
}
1062+
1063+
JNIEXPORT jboolean JNICALL Java_sun_awt_screencast_ScreencastHelper_loadPipewire(
1064+
JNIEnv *env, jclass cls, jboolean screencastDebug
1065+
) {
1066+
return JNI_FALSE;
1067+
}
1068+
#endif

src/java.desktop/unix/native/libawt_xawt/awt/screencast_portal.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@
2929
#include <string.h>
3030
#include <pwd.h>
3131
#include <unistd.h>
32+
33+
#ifndef _AIX
3234
#include "screencast_pipewire.h"
35+
3336
#include "screencast_portal.h"
3437

3538
extern volatile bool isGtkMainThread;
@@ -925,3 +928,4 @@ int getPipewireFd(const gchar *token,
925928
DEBUG_SCREENCAST("pwFd %i\n", pipewireFd);
926929
return pipewireFd;
927930
}
931+
#endif

src/java.desktop/unix/native/libpipewire/include/spa/utils/endian.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@
1818
#define bswap_16 _byteswap_ushort
1919
#define bswap_32 _byteswap_ulong
2020
#define bswap_64 _byteswap_uint64
21-
#elif defined(AIX)
22-
#include <sys/machine.h>
23-
#define __BIG_ENDIAN BIG_ENDIAN
24-
#define __BYTE_ORDER BIG_ENDIAN
2521
#else
2622
#include <endian.h>
2723
#include <byteswap.h>

0 commit comments

Comments
 (0)