mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
Netopeer2: update Netopeer2 and dependencies to master
libnetconf2 to 1.1.24 libyang to 1.0.167 sysrepo to 1.4.58 Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
--- a/CMakeLists.txt 2020-05-08 13:29:30.903800624 +0300
|
||||
+++ b/CMakeLists.txt 2020-05-08 13:29:50.943582218 +0300
|
||||
@@ -153,7 +153,7 @@
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNC_ENABLED_SSH")
|
||||
message(STATUS "LibSSH version ${LibSSH_VERSION} found")
|
||||
|
||||
- if(LibSSH_VERSION VERSION_EQUAL 0.9.3 OR LibSSH_VERSION VERSION_EQUAL 0.9.4)
|
||||
+ if(LibSSH_VERSION VERSION_EQUAL 0.9.x)
|
||||
message(FATAL_ERROR "LibSSH ${LibSSH_VERSION} includes regression bugs and libnetconf2 will NOT work properly, try to use another version")
|
||||
endif()
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -176,6 +176,7 @@ target_link_libraries(netconf2 ${CMAKE_THREAD_LIBS_INIT})
|
||||
set(CMAKE_REQUIRED_LIBRARIES pthread)
|
||||
check_include_file(stdatomic.h HAVE_STDATOMIC)
|
||||
check_function_exists(pthread_mutex_timedlock HAVE_PTHREAD_MUTEX_TIMEDLOCK)
|
||||
+check_function_exists(pthread_rwlockattr_setkind_np HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP)
|
||||
|
||||
# dependencies - openssl
|
||||
if(ENABLE_TLS OR ENABLE_DNSSEC OR ENABLE_SSH)
|
||||
--- a/src/config.h.in
|
||||
+++ b/src/config.h.in
|
||||
@@ -73,4 +73,7 @@
|
||||
*/
|
||||
#define NC_PS_QUEUE_SIZE @MAX_PSPOLL_THREAD_COUNT@
|
||||
|
||||
+/* Portability feature-check macros. */
|
||||
+#cmakedefine HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP
|
||||
+
|
||||
#endif /* NC_CONFIG_H_ */
|
||||
--- a/src/session_server.c
|
||||
+++ b/src/session_server.c
|
||||
@@ -560,6 +560,7 @@ nc_server_init(struct ly_ctx *ctx)
|
||||
errno=0;
|
||||
|
||||
if (pthread_rwlockattr_init(&attr) == 0) {
|
||||
+#if defined(HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP)
|
||||
if (pthread_rwlockattr_setkind_np(&attr, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP) == 0) {
|
||||
if (pthread_rwlock_init(&server_opts.endpt_lock, &attr) != 0) {
|
||||
ERR("%s: failed to init rwlock(%s).", __FUNCTION__, strerror(errno));
|
||||
@@ -570,6 +571,7 @@ nc_server_init(struct ly_ctx *ctx)
|
||||
} else {
|
||||
ERR("%s: failed set attribute (%s).", __FUNCTION__, strerror(errno));
|
||||
}
|
||||
+#endif
|
||||
pthread_rwlockattr_destroy(&attr);
|
||||
} else {
|
||||
ERR("%s: failed init attribute (%s).", __FUNCTION__, strerror(errno));
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/src/io.c
|
||||
+++ b/src/io.c
|
||||
@@ -62,7 +62,7 @@ nc_ssl_error_get_reasons(void)
|
||||
ERRMEM;
|
||||
return NULL;
|
||||
}
|
||||
- reason_len += sprintf(reasons + reason_len, ERR_reason_error_string(e));
|
||||
+ reason_len += sprintf(reasons + reason_len, "%s", ERR_reason_error_string(e));
|
||||
}
|
||||
|
||||
return reasons;
|
||||
Reference in New Issue
Block a user