Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.
/ jdk13u-dev Public archive

Commit e1b5440

Browse files
Olga MikhaltsovaYuri Nesterenko
Olga Mikhaltsova
authored and
Yuri Nesterenko
committed
8274293: Build failure on macOS with Xcode 13.0 as vfork is deprecated
Reviewed-by: yan Backport-of: 252aaa9249d8979366b37d59487b5b039d923e35
1 parent fb14689 commit e1b5440

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/java.base/unix/native/libjava/ProcessImpl_md.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,8 @@ static int copystrings(char *buf, int offset, const char * const *arg) {
430430
__attribute_noinline__
431431
#endif
432432

433-
/* vfork(2) is deprecated on Solaris */
434-
#ifndef __solaris__
433+
/* vfork(2) is deprecated on Solaris and Darwin */
434+
#if !defined(__APPLE__) && !defined(__solaris__)
435435
static pid_t
436436
vforkChild(ChildStuff *c) {
437437
volatile pid_t resultPid;
@@ -561,8 +561,8 @@ spawnChild(JNIEnv *env, jobject process, ChildStuff *c, const char *helperpath)
561561
static pid_t
562562
startChild(JNIEnv *env, jobject process, ChildStuff *c, const char *helperpath) {
563563
switch (c->mode) {
564-
/* vfork(2) is deprecated on Solaris */
565-
#ifndef __solaris__
564+
/* vfork(2) is deprecated on Solaris and Darwin */
565+
#if !defined(__APPLE__) && !defined(__solaris__)
566566
case MODE_VFORK:
567567
return vforkChild(c);
568568
#endif

0 commit comments

Comments
 (0)