aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-core/openjdk/patches-openjdk-14/fixed_libsctp_link_errors_caused_by_GCC10.patch
blob: 8111fa71889d8b82f1c23486e5b825ef88acf646 (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
# HG changeset patch
# User qpzhang
# Date 1580894055 -28800
# Node ID 8e6fa89397ca26bf9f573888755d89d7104afcd4
# Parent  eaefceb7f52e0b17c070c9388e2b2578d48dcf3e
8238386: (sctp) jdk.sctp/unix/native/libsctp/SctpNet.c "multiple definition" link errors with GCC10
Summary: Fixed libsctp link errors caused by GCC10 default -fno-common
Reviewed-by: chegar

diff -r eaefceb7f52e -r 8e6fa89397ca src/jdk.sctp/unix/native/libsctp/Sctp.h
--- a/src/jdk.sctp/unix/native/libsctp/Sctp.h	Tue Feb 11 14:24:31 2020 +0530
+++ b/src/jdk.sctp/unix/native/libsctp/Sctp.h	Wed Feb 05 17:14:15 2020 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
@@ -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);
 
diff -r eaefceb7f52e -r 8e6fa89397ca src/jdk.sctp/unix/native/libsctp/SctpNet.c
--- a/src/jdk.sctp/unix/native/libsctp/SctpNet.c	Tue Feb 11 14:24:31 2020 +0530
+++ b/src/jdk.sctp/unix/native/libsctp/SctpNet.c	Wed Feb 05 17:14:15 2020 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
@@ -43,6 +43,13 @@
 static const char* nativeSctpLib = "libsctp.so.1";
 static jboolean funcsLoaded = JNI_FALSE;
 
+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;
+
 JNIEXPORT jint JNICALL DEF_JNI_OnLoad
   (JavaVM *vm, void *reserved) {
     return JNI_VERSION_1_2;