mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8238386: (sctp) jdk.sctp/unix/native/libsctp/SctpNet.c "multiple definition" link errors with GCC10
Fixed libsctp link errors caused by GCC10 default -fno-common Reviewed-by: chegar
This commit is contained in:
parent
dfaaec9aff
commit
1d42f083c1
2 changed files with 15 additions and 8 deletions
|
@ -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 @@ typedef int sctp_peeloff_func(int sock, sctp_assoc_t id);
|
|||
|
||||
#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);
|
||||
|
||||
|
|
|
@ -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 jmethodID isaCtrID = 0;
|
|||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue