Skip to content

Commit c08b414

Browse files
authored
Merge pull request #19900 from Deigue/openxl-fixes-1
Open XL attribute packed and misc fixes
2 parents 2b33c84 + b5849ba commit c08b414

File tree

4 files changed

+40
-4
lines changed

4 files changed

+40
-4
lines changed

runtime/port/sysvipc/j9shmem.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#include "portpriv.h"
4848
#include "j9sharedhelper.h"
4949
#include "j9shmem.h"
50+
#include "omrutil.h"
5051
#include "protect_helpers.h"
5152
#include "j9SysvIPCWrappers.h"
5253
#include "shchelp.h"
@@ -1726,7 +1727,7 @@ openSharedMemory (J9PortLibrary *portLibrary, intptr_t fd, const char *baseFile,
17261727
goto failDontUnlink;
17271728
}
17281729
} else {
1729-
#if defined(__GNUC__) || defined(AIXPPC)
1730+
#if (defined(__GNUC__) && !defined(J9ZOS390)) || defined(AIXPPC)
17301731
#if defined(OSX)
17311732
/*Use ._key for OSX*/
17321733
if (buf.shm_perm._key != controlinfo->common.ftok_key)

runtime/port/sysvipc/j9shsem_deprecated.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ openSemaphore(struct J9PortLibrary *portLibrary, intptr_t fd, char *baseFile, j9
10771077
goto failDontUnlink;
10781078
}
10791079
} else {
1080-
#if defined(__GNUC__) || defined(AIXPPC) || defined(J9ZTPF)
1080+
#if (defined(__GNUC__) && !defined(J9ZOS390)) || defined(AIXPPC) || defined(J9ZTPF)
10811081
#if defined(OSX)
10821082
/*Use _key for OSX*/
10831083
if (buf.sem_perm._key != controlinfo->ftok_key)
+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*******************************************************************************
2+
* Copyright IBM Corp. and others 2025
3+
*
4+
* This program and the accompanying materials are made available under
5+
* the terms of the Eclipse Public License 2.0 which accompanies this
6+
* distribution and is available at https://www.eclipse.org/legal/epl-2.0/
7+
* or the Apache License, Version 2.0 which accompanies this distribution and
8+
* is available at https://www.apache.org/licenses/LICENSE-2.0.
9+
*
10+
* This Source Code may also be made available under the following
11+
* Secondary Licenses when the conditions for such availability set
12+
* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
13+
* General Public License, version 2 with the GNU Classpath
14+
* Exception [1] and GNU General Public License, version 2 with the
15+
* OpenJDK Assembly Exception [2].
16+
*
17+
* [1] https://www.gnu.org/software/classpath/license.html
18+
* [2] https://openjdk.org/legal/assembly-exception.html
19+
*
20+
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0 OR GPL-2.0-only WITH OpenJDK-assembly-exception-1.0
21+
*******************************************************************************/
22+
23+
/**
24+
* @file
25+
* @ingroup Port
26+
* @brief Hypervisor Detection helper functions common to z/VM & and PR/SM Hypervisor
27+
*/
28+
29+
#ifndef J9HYPERVISOR_SYSTEMZ_H_
30+
#define J9HYPERVISOR_SYSTEMZ_H_
31+
32+
intptr_t
33+
systemz_startup(struct J9PortLibrary *portLibrary);
34+
35+
#endif

runtime/port/zos390/j9sysinfo_helpers.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ extern "C" {
4343
*/
4444
extern int getstfle(int lastDoubleWord, uint64_t *bits);
4545

46-
typedef __packed struct J9LPDat {
46+
typedef __attribute__((packed)) struct J9LPDat {
4747
int32_t length; /**< 0:4 length of area */
4848
uint8_t version; /**< 4:1 version */
4949
uint8_t flags; /**< 5:1 flags */
@@ -76,7 +76,7 @@ typedef __packed struct J9LPDat {
7676
uint8_t reserved2[8]; /* 96:8 reserved for future use */
7777
} J9LPDat;
7878

79-
typedef __packed struct J9LPDatServiceTableEntry {
79+
typedef __attribute__((packed)) struct J9LPDatServiceTableEntry {
8080
int32_t serviceUncapped; /**< 0:4 basic-mode service units accumulated while the partition
8181
* was uncapped
8282
*/

0 commit comments

Comments
 (0)