!12 fix libupnp compile issue. update to version 1.14.7
From: @dou33 Reviewed-by: @handsome_feng,@handsome_feng Signed-off-by: @handsome_feng,@handsome_feng
This commit is contained in:
commit
404ba5a99d
57
0001-fix-compile-issue.patch
Normal file
57
0001-fix-compile-issue.patch
Normal file
@ -0,0 +1,57 @@
|
||||
diff -Naur libupnp-1.14.7/upnp/inc/ithread.h libupnp-1.14.7~/upnp/inc/ithread.h
|
||||
--- libupnp-1.14.7/upnp/inc/ithread.h 2021-05-09 05:19:44.000000000 +0800
|
||||
+++ libupnp-1.14.7~/upnp/inc/ithread.h 2021-06-12 07:24:03.890581013 +0800
|
||||
@@ -304,11 +304,8 @@
|
||||
* Returns EINVAL if the kind is not supported.
|
||||
* See man page for pthread_mutexattr_setkind_np
|
||||
*****************************************************************************/
|
||||
-#if defined(PTHREAD_MUTEX_RECURSIVE) || defined(__DragonFly__)
|
||||
- #define ithread_mutexattr_setkind_np pthread_mutexattr_settype
|
||||
-#else
|
||||
- #define ithread_mutexattr_setkind_np pthread_mutexattr_setkind_np
|
||||
-#endif /* UPNP_USE_RWLOCK */
|
||||
+#define ithread_mutexattr_setkind_np pthread_mutexattr_settype
|
||||
+#define ithread_mutexattr_settype pthread_mutexattr_settype
|
||||
|
||||
/****************************************************************************
|
||||
* Function: ithread_mutexattr_getkind_np
|
||||
@@ -329,11 +326,8 @@
|
||||
* Always returns 0.
|
||||
* See man page for pthread_mutexattr_getkind_np
|
||||
*****************************************************************************/
|
||||
-#if defined(PTHREAD_MUTEX_RECURSIVE) || defined(__DragonFly__)
|
||||
- #define ithread_mutexattr_getkind_np pthread_mutexattr_gettype
|
||||
-#else
|
||||
- #define ithread_mutexattr_getkind_np pthread_mutexattr_getkind_np
|
||||
-#endif /* UPNP_USE_RWLOCK */
|
||||
+#define ithread_mutexattr_getkind_np pthread_mutexattr_gettype
|
||||
+#define ithread_mutexattr_gettype pthread_mutexattr_gettype
|
||||
|
||||
/****************************************************************************
|
||||
* Function: ithread_mutex_init
|
||||
@@ -898,15 +892,16 @@
|
||||
#ifdef _WIN32
|
||||
#define imillisleep Sleep
|
||||
#else
|
||||
-#if _POSIX_C_SOURCE < 200809L
|
||||
- #define imillisleep(x) usleep(1000 * x)
|
||||
-#else
|
||||
- #define imillisleep(x) \
|
||||
- do { \
|
||||
- const struct timespec req = {0, x * 1000 * 1000}; \
|
||||
- nanosleep(&req, NULL); \
|
||||
- } while(0)
|
||||
-#endif
|
||||
+ #if _POSIX_C_SOURCE < 200809L
|
||||
+ #define imillisleep(x) usleep(1000 * x)
|
||||
+ #else
|
||||
+ #define imillisleep(x) \
|
||||
+ do { \
|
||||
+ const struct timespec req = { \
|
||||
+ 0, x * 1000 * 1000}; \
|
||||
+ nanosleep(&req, NULL); \
|
||||
+ } while (0)
|
||||
+ #endif
|
||||
#endif
|
||||
|
||||
#if !defined(PTHREAD_MUTEX_RECURSIVE) && !defined(__DragonFly__) && \
|
||||
Binary file not shown.
BIN
libupnp-1.14.7.tar.bz2
Normal file
BIN
libupnp-1.14.7.tar.bz2
Normal file
Binary file not shown.
15
libupnp.spec
15
libupnp.spec
@ -1,12 +1,14 @@
|
||||
Version: 1.12.1
|
||||
Version: 1.14.7
|
||||
Summary: Universal Plug and Play (UPnP) SDK
|
||||
Name: libupnp
|
||||
Release: 2
|
||||
Release: 1
|
||||
License: BSD
|
||||
URL: https://sourceforge.net/projects/pupnp
|
||||
Source: https://downloads.sourceforge.net/pupnp/%{name}-%{version}.tar.bz2
|
||||
Patch0: 0001-fix-compile-issue.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: make
|
||||
|
||||
|
||||
%description
|
||||
@ -25,6 +27,8 @@ the UPnP SDK libraries.
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%configure \
|
||||
--enable-static=no \
|
||||
@ -47,7 +51,7 @@ sed -i.rpath 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
||||
%license COPYING
|
||||
%doc THANKS
|
||||
%{_libdir}/libixml.so.11*
|
||||
%{_libdir}/libupnp.so.16*
|
||||
%{_libdir}/libupnp.so.17*
|
||||
|
||||
%files devel
|
||||
%{_includedir}/upnp/
|
||||
@ -56,9 +60,12 @@ sed -i.rpath 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
||||
%{_libdir}/pkgconfig/libupnp.pc
|
||||
|
||||
%changelog
|
||||
* Fri Aug 13 2021 douyan <douyan@kylinos.cn> - 1.14.7-1
|
||||
- Update to version 1.14.7-1
|
||||
|
||||
* Fri Jan 29 2021 lvhan <lvhan@kylinos.cn> - 1.12.1-2
|
||||
- Update to version 1.12.1-2
|
||||
- fix CVE-2020-13848
|
||||
|
||||
* Thu Jul 23 2020 Zhao Yang <yangzhao1@kylinos.cn> - 1.8.4-1
|
||||
- Initial release for OpenEuler
|
||||
- Initial release for openEuler
|
||||
Loading…
x
Reference in New Issue
Block a user