changeset 14661:41be6128f4c1

8238380: java.base/unix/native/libjava/childproc.c "multiple definition" link errors with GCC10 Reviewed-by: stuefe, clanger, rriggs, sgehwolf Contributed-by: Leslie Zhai <zhaixiang@loongson.cn>
author qpzhang
date Tue, 04 Feb 2020 21:27:10 +0800
parents a844d7f2ac12
children d5c69bd5f7ad
files src/solaris/native/java/lang/childproc.c src/solaris/native/java/lang/childproc.h
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/native/java/lang/childproc.c	Wed Feb 05 17:14:15 2020 +0800
+++ b/src/solaris/native/java/lang/childproc.c	Tue Feb 04 21:27:10 2020 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 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
@@ -33,6 +33,7 @@
 
 #include "childproc.h"
 
+const char * const *parentPathv;
 
 ssize_t
 restartableWrite(int fd, const void *buf, size_t count)
--- a/src/solaris/native/java/lang/childproc.h	Wed Feb 05 17:14:15 2020 +0800
+++ b/src/solaris/native/java/lang/childproc.h	Tue Feb 04 21:27:10 2020 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 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
@@ -119,7 +119,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);