aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-core/openjdk/patches-openjdk-14/libjava_childproc_multiple_definition_link_errors_with_GCC10.patch
blob: a972bc66c96b494cf7c2be2b85fe46e51158655c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# HG changeset patch
# User qpzhang
# Date 1580822830 -28800
# Node ID 6925fca959590dd0f747a9cffa5f0664ec02c7b1
# Parent  8f6ffa575f63db3f07f96e52c97883fbaff459b4
8238380: java.base/unix/native/libjava/childproc.c "multiple definition" link errors with GCC10
Reviewed-by: stuefe, clanger, rriggs
Contributed-by: patrick@os.amperecomputing.com

diff -r 8f6ffa575f63 -r 6925fca95959 src/java.base/unix/native/libjava/childproc.c
--- a/src/java.base/unix/native/libjava/childproc.c	Tue Feb 11 11:17:37 2020 +0800
+++ b/src/java.base/unix/native/libjava/childproc.c	Tue Feb 04 21:27:10 2020 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2020, 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
@@ -34,6 +34,7 @@
 
 #include "childproc.h"
 
+const char * const *parentPathv;
 
 ssize_t
 restartableWrite(int fd, const void *buf, size_t count)
diff -r 8f6ffa575f63 -r 6925fca95959 src/java.base/unix/native/libjava/childproc.h
--- a/src/java.base/unix/native/libjava/childproc.h	Tue Feb 11 11:17:37 2020 +0800
+++ b/src/java.base/unix/native/libjava/childproc.h	Tue Feb 04 21:27:10 2020 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2020, 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
@@ -126,7 +126,7 @@
  * The cached and split version of the JDK's effective PATH.
  * (We don't support putenv("PATH=...") in native code)
  */
-const char * const *parentPathv;
+extern const char * const *parentPathv;
 
 ssize_t restartableWrite(int fd, const void *buf, size_t count);
 int restartableDup2(int fd_from, int fd_to);