diff --git a/0001-fix-compile-issue.patch b/0001-fix-compile-issue.patch new file mode 100644 index 0000000..4f2f90e --- /dev/null +++ b/0001-fix-compile-issue.patch @@ -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__) && \ diff --git a/libupnp-1.12.1.tar.bz2 b/libupnp-1.12.1.tar.bz2 deleted file mode 100644 index 3426d63..0000000 Binary files a/libupnp-1.12.1.tar.bz2 and /dev/null differ diff --git a/libupnp-1.14.7.tar.bz2 b/libupnp-1.14.7.tar.bz2 new file mode 100644 index 0000000..cda7298 Binary files /dev/null and b/libupnp-1.14.7.tar.bz2 differ diff --git a/libupnp.spec b/libupnp.spec index fc0e788..ad6b426 100644 --- a/libupnp.spec +++ b/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 - 1.14.7-1 +- Update to version 1.14.7-1 + * Fri Jan 29 2021 lvhan - 1.12.1-2 - Update to version 1.12.1-2 - fix CVE-2020-13848 * Thu Jul 23 2020 Zhao Yang - 1.8.4-1 -- Initial release for OpenEuler +- Initial release for OpenEuler \ No newline at end of file