Skip to content

Commit cc20fde

Browse files
author
duke
committed
Backport 0c697daf474b580cd447db1cb86b09c85a251175
1 parent 4b2d777 commit cc20fde

File tree

4 files changed

+38
-7
lines changed

4 files changed

+38
-7
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,12 @@ ifeq ($(call isTargetOs, windows macosx), false)
205205
common/awt/systemscale \
206206
common/font \
207207
common/java2d/opengl \
208-
common/java2d/x11 \
209-
$(LIBPIPEWIRE_HEADER_DIRS)
208+
common/java2d/x11
209+
210+
# exclude pipewire from the AIX build, no Wayland support
211+
ifeq ($(call isTargetOs, aix), false)
212+
LIBAWT_XAWT_EXTRA_HEADER_DIRS += $(LIBPIPEWIRE_HEADER_DIRS)
213+
endif
210214

211215
LIBAWT_XAWT_CFLAGS += -DXAWT -DXAWT_HACK \
212216
$(FONTCONFIG_CFLAGS) \

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, 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>
@@ -1036,3 +1038,28 @@ JNIEXPORT jint JNICALL Java_sun_awt_screencast_ScreencastHelper_getRGBPixelsImpl
10361038
releaseToken(env, jtoken, token);
10371039
return 0;
10381040
}
1041+
#else
1042+
JNIEXPORT void JNICALL
1043+
Java_sun_awt_screencast_ScreencastHelper_closeSession(JNIEnv *env, jclass cls) {
1044+
}
1045+
1046+
JNIEXPORT jint JNICALL Java_sun_awt_screencast_ScreencastHelper_getRGBPixelsImpl(
1047+
JNIEnv *env,
1048+
jclass cls,
1049+
jint jx,
1050+
jint jy,
1051+
jint jwidth,
1052+
jint jheight,
1053+
jintArray pixelArray,
1054+
jintArray affectedScreensBoundsArray,
1055+
jstring jtoken
1056+
) {
1057+
return -1; /* RESULT_ERROR */
1058+
}
1059+
1060+
JNIEXPORT jboolean JNICALL Java_sun_awt_screencast_ScreencastHelper_loadPipewire(
1061+
JNIEnv *env, jclass cls, jboolean screencastDebug
1062+
) {
1063+
return JNI_FALSE;
1064+
}
1065+
#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

@@ -904,3 +907,4 @@ int getPipewireFd(const gchar *token,
904907
DEBUG_SCREENCAST("pwFd %i\n", pipewireFd);
905908
return pipewireFd;
906909
}
910+
#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)