Gentoo Archives: gentoo-commits

From: Bernard Cafarelli <voyageur@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/mtpfs/files/, sys-fs/mtpfs/
Date: Thu, 30 Sep 2021 22:20:46
Message-Id: 1633040433.8c778578a4f5e73a7edff20e09d35afbac7a8c06.voyageur@gentoo
1 commit: 8c778578a4f5e73a7edff20e09d35afbac7a8c06
2 Author: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 30 22:20:05 2021 +0000
4 Commit: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 30 22:20:33 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c778578
7
8 sys-fs/mtpfs: fix deprecated init of lock
9
10 This became an error with glib 2.70
11
12 Closes: https://bugs.gentoo.org/814965
13 Package-Manager: Portage-3.0.26, Repoman-3.0.3
14 Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>
15
16 .../files/mtpfs-1.1-deprecated_lock_init.patch | 24 ++++++++++++++++++++++
17 sys-fs/mtpfs/mtpfs-1.1-r6.ebuild | 3 ++-
18 2 files changed, 26 insertions(+), 1 deletion(-)
19
20 diff --git a/sys-fs/mtpfs/files/mtpfs-1.1-deprecated_lock_init.patch b/sys-fs/mtpfs/files/mtpfs-1.1-deprecated_lock_init.patch
21 new file mode 100644
22 index 00000000000..d369ebfe1f2
23 --- /dev/null
24 +++ b/sys-fs/mtpfs/files/mtpfs-1.1-deprecated_lock_init.patch
25 @@ -0,0 +1,24 @@
26 +diff -Naur mtpfs-1.1.orig/mtpfs.c mtpfs-1.1/mtpfs.c
27 +--- mtpfs-1.1.orig/mtpfs.c 2021-10-01 00:15:15.763423589 +0200
28 ++++ mtpfs-1.1/mtpfs.c 2021-10-01 00:16:07.626486888 +0200
29 +@@ -1371,6 +1371,8 @@
30 + extern int optind;
31 + extern char *optarg;
32 +
33 ++ g_mutex_init(&device_lock);
34 ++
35 + //while ((opt = getopt(argc, argv, "d")) != -1 ) {
36 + //switch (opt) {
37 + //case 'd':
38 +diff -Naur mtpfs-1.1.orig/mtpfs.h mtpfs-1.1/mtpfs.h
39 +--- mtpfs-1.1.orig/mtpfs.h 2021-10-01 00:15:15.779423609 +0200
40 ++++ mtpfs-1.1/mtpfs.h 2021-10-01 00:16:20.322502337 +0200
41 +@@ -77,7 +77,7 @@
42 + static GSList *myfiles = NULL;
43 + static LIBMTP_playlist_t *playlists = NULL;
44 + static gboolean playlists_changed = FALSE;
45 +-static GMutex device_lock = G_STATIC_MUTEX_INIT;
46 ++static GMutex device_lock;
47 +
48 +
49 + #endif /* _MTPFS_H_ */
50
51 diff --git a/sys-fs/mtpfs/mtpfs-1.1-r6.ebuild b/sys-fs/mtpfs/mtpfs-1.1-r6.ebuild
52 index 3bc2351e26c..04dd5b86b90 100644
53 --- a/sys-fs/mtpfs/mtpfs-1.1-r6.ebuild
54 +++ b/sys-fs/mtpfs/mtpfs-1.1-r6.ebuild
55 @@ -27,7 +27,8 @@ DOCS=(AUTHORS NEWS README)
56 PATCHES=( "${FILESDIR}"/${P}-fix-mutex-crash.patch
57 "${FILESDIR}"/${P}-unitialized-variable.patch
58 "${FILESDIR}"/${P}-wking-patches/
59 - "${FILESDIR}"/${P}-g_printf.patch )
60 + "${FILESDIR}"/${P}-g_printf.patch
61 + "${FILESDIR}"/${P}-deprecated_lock_init.patch )
62
63 src_prepare() {
64 default