mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-27 04:35:18 +01:00
parent
15b39887c5
commit
da27924a49
6
.gitmodules
vendored
Normal file
6
.gitmodules
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
[submodule "native/mbedtls"]
|
||||
path = native/mbedtls
|
||||
url = https://github.com/ARMmbed/mbedtls.git
|
||||
[submodule "native/zlib"]
|
||||
path = native/zlib
|
||||
url = https://github.com/cloudflare/zlib.git
|
@ -1,6 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
CXX="g++ -shared -fPIC -O3 -Wall -Werror -I$JAVA_HOME/include/ -I$JAVA_HOME/include/linux/"
|
||||
set -eu
|
||||
|
||||
$CXX src/main/c/NativeCipherImpl.cpp -o src/main/resources/native-cipher.so -lcrypto
|
||||
$CXX src/main/c/NativeCompressImpl.cpp -o src/main/resources/native-compress.so -lz
|
||||
echo "Compiling mbedtls"
|
||||
(cd mbedtls && make no_test)
|
||||
|
||||
echo "Compiling zlib"
|
||||
(cd zlib && CFLAGS=-fPIC ./configure --static && make)
|
||||
|
||||
CXX="g++ -shared -fPIC -Wl,--wrap=memcpy -O3 -Wall -Werror -I$JAVA_HOME/include/ -I$JAVA_HOME/include/linux/"
|
||||
|
||||
$CXX -Imbedtls/include src/main/c/NativeCipherImpl.cpp -o src/main/resources/native-cipher.so mbedtls/library/libmbedcrypto.a
|
||||
$CXX -Izlib src/main/c/NativeCompressImpl.cpp -o src/main/resources/native-compress.so zlib/libz.a
|
||||
|
1
native/mbedtls
Submodule
1
native/mbedtls
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit e483a77c85e1f9c1dd2eb1c5a8f552d2617fe400
|
@ -1,12 +1,15 @@
|
||||
// Support for CentOS 6
|
||||
__asm__(".symver memcpy,memcpy@GLIBC_2.2.5");
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <mbedtls/aes.h>
|
||||
#include "net_md_5_bungee_jni_cipher_NativeCipherImpl.h"
|
||||
|
||||
// Support for CentOS 6
|
||||
__asm__(".symver memcpy,memcpy@GLIBC_2.2.5");
|
||||
void *__wrap_memcpy(void *dest, const void *src, size_t n) {
|
||||
return memcpy(dest, src, n);
|
||||
}
|
||||
|
||||
typedef unsigned char byte;
|
||||
|
||||
struct crypto_context {
|
||||
|
@ -1,7 +1,15 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <zlib.h>
|
||||
#include "net_md_5_bungee_jni_zlib_NativeCompressImpl.h"
|
||||
|
||||
// Support for CentOS 6
|
||||
__asm__(".symver memcpy,memcpy@GLIBC_2.2.5");
|
||||
void *__wrap_memcpy(void *dest, const void *src, size_t n) {
|
||||
return memcpy(dest, src, n);
|
||||
}
|
||||
|
||||
typedef unsigned char byte;
|
||||
|
||||
static jfieldID consumedID;
|
||||
|
Binary file not shown.
Binary file not shown.
1
native/zlib
Submodule
1
native/zlib
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 959b4ea305821e753385e873ec4edfaa9a5d49b7
|
Loading…
Reference in New Issue
Block a user