define use_mtpz only in one .c file
This commit is contained in:
parent
9dfc1bbc4c
commit
28f791879d
21
backport-libmtp-fix-multiple-definition.patch
Normal file
21
backport-libmtp-fix-multiple-definition.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
--- a/src/libmtp.c 2017-06-10 22:35:54.000000000 +0800
|
||||||
|
+++ b/src/libmtp.c 2021-08-04 19:17:57.464456535 +0800
|
||||||
|
@@ -44,6 +44,7 @@
|
||||||
|
#include "util.h"
|
||||||
|
|
||||||
|
#include "mtpz.h"
|
||||||
|
+int use_mtpz;
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
--- a/src/mtpz.h 2014-08-25 02:41:04.000000000 +0800
|
||||||
|
+++ b/src/mtpz.h 2021-08-04 19:17:03.819790448 +0800
|
||||||
|
@@ -45,7 +45,7 @@
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-int use_mtpz;
|
||||||
|
+extern int use_mtpz;
|
||||||
|
|
||||||
|
#endif /* LIBMTP_H_INCLUSION_GUARD */
|
||||||
|
|
||||||
@ -1,11 +1,12 @@
|
|||||||
Name: libmtp
|
Name: libmtp
|
||||||
Version: 1.1.14
|
Version: 1.1.14
|
||||||
Release: 6
|
Release: 7
|
||||||
Summary: An Initiator implementation of the Media Transfer Protocol (MTP) in the form of a library
|
Summary: An Initiator implementation of the Media Transfer Protocol (MTP) in the form of a library
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: http://libmtp.sourceforge.net/
|
URL: http://libmtp.sourceforge.net/
|
||||||
Source0: https://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
Source0: https://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
||||||
Patch0: 0001-doc-Don-t-document-internal-endian-macros.patch
|
Patch0: 0001-doc-Don-t-document-internal-endian-macros.patch
|
||||||
|
Patch1: backport-libmtp-fix-multiple-definition.patch
|
||||||
|
|
||||||
BuildRequires: libusbx-devel, doxygen, libgcrypt-devel, chrpath, gcc
|
BuildRequires: libusbx-devel, doxygen, libgcrypt-devel, chrpath, gcc
|
||||||
Requires: udev
|
Requires: udev
|
||||||
@ -26,7 +27,7 @@ Requires: pkgconfig, libusb1-devel, libgcrypt-devel
|
|||||||
This package includes development files for libmtp.
|
This package includes development files for libmtp.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1
|
%autosetup -n libmtp-%{version} -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --disable-static --with-udev-rules=69-libmtp.rules
|
%configure --disable-static --with-udev-rules=69-libmtp.rules
|
||||||
@ -65,6 +66,9 @@ chrpath -d $RPM_BUILD_ROOT{%{_bindir},/usr/lib/udev}/mtp*
|
|||||||
%{_libdir}/pkgconfig/%{name}.pc
|
%{_libdir}/pkgconfig/%{name}.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Web Aug 04 2021 Liu Yinsi <liuyinsi@163.com> - 1.1.14-7
|
||||||
|
- define use_mtpz only in one .c file
|
||||||
|
|
||||||
* Tue Jun 08 2021 wulei <wulei80@huawei.com> - 1.1.14-6
|
* Tue Jun 08 2021 wulei <wulei80@huawei.com> - 1.1.14-6
|
||||||
- fixes failed: error: no acceptable C compiler found in $PATH
|
- fixes failed: error: no acceptable C compiler found in $PATH
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user