nzbget: Update from 20.0 to 21.0

This commit is contained in:
Fredrik Fornwall 2019-05-05 22:48:00 +02:00
parent eadd177584
commit fdbe3ab73c
5 changed files with 3 additions and 74 deletions

View File

@ -1,10 +1,10 @@
TERMUX_PKG_HOMEPAGE=https://nzbget.net/
TERMUX_PKG_DESCRIPTION="The most efficient usenet downloader"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_VERSION=20.0
TERMUX_PKG_REVISION=3
TERMUX_PKG_VERSION=21.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_SHA256=65a5d58eb8f301e62cf086b72212cbf91de72316ffc19182ae45119ddd058d53
TERMUX_PKG_SRCURL=https://github.com/nzbget/nzbget/releases/download/v${TERMUX_PKG_VERSION}/nzbget-${TERMUX_PKG_VERSION}-src.tar.gz
TERMUX_PKG_SHA256=04dc36d432549c33d55145ecd95cc4309b3ab4a7731a1a03d954de389eacd06f
TERMUX_PKG_DEPENDS="libxml2, ncurses, openssl, p7zip, zlib"
TERMUX_PKG_RECOMMENDS="unrar"
TERMUX_PKG_BUILD_IN_SRC=yes

View File

@ -1,22 +0,0 @@
diff --git a/daemon/main/nzbget.cpp b/daemon/main/nzbget.cpp
index c4f27721..aabf69cc 100644
--- a/daemon/main/nzbget.cpp
+++ b/daemon/main/nzbget.cpp
@@ -19,6 +19,8 @@
*/
+#include <sys/file.h>
+
#include "nzbget.h"
#include "ServerPool.h"
#include "Log.h"
@@ -932,7 +934,7 @@ void NZBGet::Daemonize()
error("Starting daemon failed: could not create lock-file %s", m_options->GetLockFile());
exit(1);
}
- if (lockf(lfp, F_TLOCK, 0) < 0)
+ if (flock(lfp, LOCK_EX) < 0)
{
error("Starting daemon failed: could not acquire lock on lock-file %s", m_options->GetLockFile());
exit(1);

View File

@ -1,14 +0,0 @@
diff --git a/daemon/main/nzbget.h b/daemon/main/nzbget.h
index bfaf03b9..eeb4445c 100644
--- a/daemon/main/nzbget.h
+++ b/daemon/main/nzbget.h
@@ -254,7 +254,9 @@ typedef int pid_t;
#include <openssl/sha.h>
#include <openssl/pem.h>
#include <openssl/x509v3.h>
+#ifndef OPENSSL_NO_COMP
#include <openssl/comp.h>
+#endif
#endif /* HAVE_OPENSSL */
#ifdef HAVE_REGEX_H

View File

@ -1,21 +0,0 @@
diff --git a/daemon/util/Thread.cpp b/daemon/util/Thread.cpp
index 199005ff..e922c402 100644
--- a/daemon/util/Thread.cpp
+++ b/daemon/util/Thread.cpp
@@ -111,7 +111,6 @@ void Thread::Start()
pthread_attr_t m_attr;
pthread_attr_init(&m_attr);
pthread_attr_setdetachstate(&m_attr, PTHREAD_CREATE_DETACHED);
- pthread_attr_setinheritsched(&m_attr, PTHREAD_INHERIT_SCHED);
m_running = !pthread_create(&m_threadObj, &m_attr, Thread::thread_handler, (void *) this);
pthread_attr_destroy(&m_attr);
#endif
@@ -140,7 +139,7 @@ bool Thread::Kill()
#ifdef WIN32
bool terminated = TerminateThread(m_threadObj, 0) != 0;
#else
- bool terminated = pthread_cancel(m_threadObj) == 0;
+ bool terminated = pthread_kill(m_threadObj, 0) == 0;
#endif
if (terminated)

View File

@ -1,14 +0,0 @@
diff --git a/daemon/connect/TlsSocket.cpp b/daemon/connect/TlsSocket.cpp
index 158101e4..2d426f22 100644
--- a/daemon/connect/TlsSocket.cpp
+++ b/daemon/connect/TlsSocket.cpp
@@ -214,7 +214,9 @@ void TlsSocket::Final()
//ENGINE_cleanup();
CONF_modules_free();
CONF_modules_unload(1);
+#ifndef OPENSSL_NO_COMP
COMP_zlib_cleanup();
+#endif
ERR_free_strings();
EVP_cleanup();
CRYPTO_cleanup_all_ex_data();