forked from andrius/gentoo-bootstrap
132 lines
5.3 KiB
Diff
132 lines
5.3 KiB
Diff
# HG changeset patch
|
|
# User qpzhang
|
|
# Date 1576233515 -28800
|
|
# Fri Dec 13 18:38:35 2019 +0800
|
|
# Node ID 61ac7220fffc3bb2661a31820d86a603f3b35103
|
|
# Parent d6a38e8f738972804e4bae6324d3cd9c8c891859
|
|
8235903: GCC default -fno-common exposes "multiple definition" link errors
|
|
Summary: Fixed C standard tentative definitions with extern keyword
|
|
Reviewed-by: alanb
|
|
|
|
diff --git a/src/java.base/unix/native/libjava/childproc.c b/src/java.base/unix/native/libjava/childproc.c
|
|
--- a/src/java.base/unix/native/libjava/childproc.c
|
|
+++ b/src/java.base/unix/native/libjava/childproc.c
|
|
@@ -34,6 +34,7 @@
|
|
|
|
#include "childproc.h"
|
|
|
|
+const char * const *parentPathv;
|
|
|
|
ssize_t
|
|
restartableWrite(int fd, const void *buf, size_t count)
|
|
diff --git a/src/java.base/unix/native/libjava/childproc.h b/src/java.base/unix/native/libjava/childproc.h
|
|
--- a/src/java.base/unix/native/libjava/childproc.h
|
|
+++ b/src/java.base/unix/native/libjava/childproc.h
|
|
@@ -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);
|
|
diff --git a/src/java.security.jgss/share/native/libj2gss/NativeFunc.c b/src/java.security.jgss/share/native/libj2gss/NativeFunc.c
|
|
--- a/src/java.security.jgss/share/native/libj2gss/NativeFunc.c
|
|
+++ b/src/java.security.jgss/share/native/libj2gss/NativeFunc.c
|
|
@@ -1,5 +1,5 @@
|
|
/*
|
|
- * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
+ * Copyright (c) 2005, 2019, 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
|
|
@@ -27,6 +27,9 @@
|
|
#include <stdlib.h>
|
|
#include "NativeFunc.h"
|
|
|
|
+/* global GSS function table */
|
|
+GSS_FUNCTION_TABLE_PTR ftab;
|
|
+
|
|
/* standard GSS method names (ordering is from mapfile) */
|
|
static const char RELEASE_NAME[] = "gss_release_name";
|
|
static const char IMPORT_NAME[] = "gss_import_name";
|
|
diff --git a/src/java.security.jgss/share/native/libj2gss/NativeFunc.h b/src/java.security.jgss/share/native/libj2gss/NativeFunc.h
|
|
--- a/src/java.security.jgss/share/native/libj2gss/NativeFunc.h
|
|
+++ b/src/java.security.jgss/share/native/libj2gss/NativeFunc.h
|
|
@@ -277,6 +277,6 @@
|
|
typedef GSS_FUNCTION_TABLE *GSS_FUNCTION_TABLE_PTR;
|
|
|
|
/* global GSS function table */
|
|
-GSS_FUNCTION_TABLE_PTR ftab;
|
|
+extern GSS_FUNCTION_TABLE_PTR ftab;
|
|
|
|
#endif
|
|
diff --git a/src/jdk.sctp/unix/native/libsctp/Sctp.c b/src/jdk.sctp/unix/native/libsctp/Sctp.c
|
|
new file mode 100644
|
|
--- /dev/null
|
|
+++ b/src/jdk.sctp/unix/native/libsctp/Sctp.c
|
|
@@ -0,0 +1,33 @@
|
|
+/*
|
|
+ * Copyright (c) 2009, 2019, 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
|
|
+ * under the terms of the GNU General Public License version 2 only, as
|
|
+ * published by the Free Software Foundation. Oracle designates this
|
|
+ * particular file as subject to the "Classpath" exception as provided
|
|
+ * by Oracle in the LICENSE file that accompanied this code.
|
|
+ *
|
|
+ * This code is distributed in the hope that it will be useful, but WITHOUT
|
|
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
+ * version 2 for more details (a copy is included in the LICENSE file that
|
|
+ * accompanied this code).
|
|
+ *
|
|
+ * You should have received a copy of the GNU General Public License version
|
|
+ * 2 along with this work; if not, write to the Free Software Foundation,
|
|
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
+ *
|
|
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
+ * or visit www.oracle.com if you need additional information or have any
|
|
+ * questions.
|
|
+ */
|
|
+
|
|
+#include "Sctp.h"
|
|
+
|
|
+sctp_getladdrs_func* nio_sctp_getladdrs;
|
|
+sctp_freeladdrs_func* nio_sctp_freeladdrs;
|
|
+sctp_getpaddrs_func* nio_sctp_getpaddrs;
|
|
+sctp_freepaddrs_func* nio_sctp_freepaddrs;
|
|
+sctp_bindx_func* nio_sctp_bindx;
|
|
+sctp_peeloff_func* nio_sctp_peeloff;
|
|
diff --git a/src/jdk.sctp/unix/native/libsctp/Sctp.h b/src/jdk.sctp/unix/native/libsctp/Sctp.h
|
|
--- a/src/jdk.sctp/unix/native/libsctp/Sctp.h
|
|
+++ b/src/jdk.sctp/unix/native/libsctp/Sctp.h
|
|
@@ -1,5 +1,5 @@
|
|
/*
|
|
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
|
|
+ * Copyright (c) 2009, 2019, 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
|
|
@@ -322,12 +322,12 @@
|
|
|
|
#endif /* __linux__ */
|
|
|
|
-sctp_getladdrs_func* nio_sctp_getladdrs;
|
|
-sctp_freeladdrs_func* nio_sctp_freeladdrs;
|
|
-sctp_getpaddrs_func* nio_sctp_getpaddrs;
|
|
-sctp_freepaddrs_func* nio_sctp_freepaddrs;
|
|
-sctp_bindx_func* nio_sctp_bindx;
|
|
-sctp_peeloff_func* nio_sctp_peeloff;
|
|
+extern sctp_getladdrs_func* nio_sctp_getladdrs;
|
|
+extern sctp_freeladdrs_func* nio_sctp_freeladdrs;
|
|
+extern sctp_getpaddrs_func* nio_sctp_getpaddrs;
|
|
+extern sctp_freepaddrs_func* nio_sctp_freepaddrs;
|
|
+extern sctp_bindx_func* nio_sctp_bindx;
|
|
+extern sctp_peeloff_func* nio_sctp_peeloff;
|
|
|
|
jboolean loadSocketExtensionFuncs(JNIEnv* env);
|
|
|