aboutsummaryrefslogtreecommitdiffstats
path: root/community/openjdk7/icedtea-jdk-fix-gcc10.patch
blob: 71af3f9ce220508d16627f617b45f4e6a6b85952 (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
Subject: Fix build error with gcc >= 10.0
Upstream: Yes
Upstream-Url: https://bugs.openjdk.java.net/browse/JDK-8235903
Author: Simon Frankenberger <simon-alpine@fraho.eu>

This is a backport of the fixes to make it compile with gcc10 again.

--- openjdk.orig/jdk/src/solaris/native/java/lang/childproc.c
+++ openjdk/jdk/src/solaris/native/java/lang/childproc.c
@@ -33,6 +33,7 @@
 
 #include "childproc.h"
 
+const char * const *parentPathv;
 
 ssize_t
 restartableWrite(int fd, const void *buf, size_t count)
--- openjdk.orig/jdk/src/solaris/native/java/lang/childproc.h
+++ openjdk/jdk/src/solaris/native/java/lang/childproc.h
@@ -118,7 +118,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);
--- openjdk.orig/jdk/src/solaris/native/sun/security/jgss/wrapper/NativeFunc.c
+++ openjdk/jdk/src/solaris/native/sun/security/jgss/wrapper/NativeFunc.c
@@ -28,6 +28,9 @@
 #include <dlfcn.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";
--- openjdk.orig/jdk/src/solaris/native/sun/security/jgss/wrapper/NativeFunc.h
+++ openjdk/jdk/src/solaris/native/sun/security/jgss/wrapper/NativeFunc.h
@@ -265,6 +265,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
--- /dev/null
+++ openjdk/jdk/src/solaris/native/sun/nio/ch/Sctp.c
@@ -0,0 +1,34 @@
+/*
+ * 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;
+
--- openjdk.orig/jdk/src/solaris/native/sun/nio/ch/Sctp.h
+++ openjdk/jdk/src/solaris/native/sun/nio/ch/Sctp.h
@@ -332,12 +332,12 @@
 #define nio_sctp_bindx sctp_bindx
 #define nio_sctp_peeloff sctp_peeloff
 #else
-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;
 #endif
 
 jboolean loadSocketExtensionFuncs(JNIEnv* env);
--- openjdk.orig/jdk/src/solaris/native/common/deps/cups_fp.c
+++ openjdk/jdk/src/solaris/native/common/deps/cups_fp.c
@@ -32,6 +32,16 @@
 
 #include <cups_fp.h>
 
+fn_cupsServer j2d_cupsServer;
+fn_ippPort j2d_ippPort;
+fn_httpConnect j2d_httpConnect;
+fn_httpClose j2d_httpClose;
+fn_cupsGetPPD j2d_cupsGetPPD;
+fn_ppdOpenFile j2d_ppdOpenFile;
+fn_ppdClose j2d_ppdClose;
+fn_ppdFindOption j2d_ppdFindOption;
+fn_ppdPageSize j2d_ppdPageSize;
+
 jboolean cups_init()
 {
   void *handle = dlopen(VERSIONED_JNI_LIB_NAME("cups", "2"),
--- openjdk.orig/jdk/src/solaris/native/common/deps/cups_fp.h
+++ openjdk/jdk/src/solaris/native/common/deps/cups_fp.h
@@ -36,15 +36,15 @@
 typedef ppd_option_t* (*fn_ppdFindOption)(ppd_file_t *, const char *);
 typedef ppd_size_t* (*fn_ppdPageSize)(ppd_file_t *, char *);
 
-fn_cupsServer j2d_cupsServer;
-fn_ippPort j2d_ippPort;
-fn_httpConnect j2d_httpConnect;
-fn_httpClose j2d_httpClose;
-fn_cupsGetPPD j2d_cupsGetPPD;
-fn_ppdOpenFile j2d_ppdOpenFile;
-fn_ppdClose j2d_ppdClose;
-fn_ppdFindOption j2d_ppdFindOption;
-fn_ppdPageSize j2d_ppdPageSize;
+extern fn_cupsServer j2d_cupsServer;
+extern fn_ippPort j2d_ippPort;
+extern fn_httpConnect j2d_httpConnect;
+extern fn_httpClose j2d_httpClose;
+extern fn_cupsGetPPD j2d_cupsGetPPD;
+extern fn_ppdOpenFile j2d_ppdOpenFile;
+extern fn_ppdClose j2d_ppdClose;
+extern fn_ppdFindOption j2d_ppdFindOption;
+extern fn_ppdPageSize j2d_ppdPageSize;
 
 #define cupsServer (*j2d_cupsServer)
 #define ippPort (*j2d_ippPort)