Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
meta-nemo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
NemoMobile
meta-nemo
Commits
3c03cae2
Commit
3c03cae2
authored
Jun 02, 2017
by
Florent Revest
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
buteo-mtp: Fix build with newer GCC that enforces flexible array position in classes
parent
fe3ed87e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
104 additions
and
1 deletion
+104
-1
0005-mtp1descriptors-redine-htole16-htole32.-to-make-sure.patch
...tp1descriptors-redine-htole16-htole32.-to-make-sure.patch
+57
-0
0006-FSStoragePlugin-Make-sure-the-inotify_event-s-flexib.patch
...SStoragePlugin-Make-sure-the-inotify_event-s-flexib.patch
+44
-0
buteo-mtp_git.bb
recipes-nemomobile/buteo/buteo-mtp_git.bb
+3
-1
No files found.
recipes-nemomobile/buteo/buteo-mtp/0005-mtp1descriptors-redine-htole16-htole32.-to-make-sure.patch
0 → 100644
View file @
3c03cae2
From c797a87345aa352b3c440a626704472fcb7daa0b Mon Sep 17 00:00:00 2001
From: Florent Revest <revestflo@gmail.com>
Date: Wed, 24 May 2017 21:21:02 +0200
Subject: [PATCH 1/2] mtp1descriptors: redine htole16, htole32... to make sure
they are constant and can initialize our structures
---
mts/transport/usb/mtp1descriptors.h | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/mts/transport/usb/mtp1descriptors.h b/mts/transport/usb/mtp1descriptors.h
index 2d356a4..05e9d2f 100644
--- a/mts/transport/usb/mtp1descriptors.h
+++ b/mts/transport/usb/mtp1descriptors.h
@@ -4,6 +4,39 @@
#include <linux/usb/functionfs.h>
#include "ptp.h"
+# if __BYTE_ORDER == __LITTLE_ENDIAN
+# define htobe16(x) __bswap_16 (x)
+# define htole16(x) (x)
+# define be16toh(x) __bswap_16 (x)
+# define le16toh(x) (x)
+
+# define htobe32(x) __bswap_32 (x)
+# define htole32(x) (x)
+# define be32toh(x) __bswap_32 (x)
+# define le32toh(x) (x)
+
+# define htobe64(x) __bswap_64 (x)
+# define htole64(x) (x)
+# define be64toh(x) __bswap_64 (x)
+# define le64toh(x) (x)
+
+# else
+# define htobe16(x) (x)
+# define htole16(x) __bswap_16 (x)
+# define be16toh(x) (x)
+# define le16toh(x) __bswap_16 (x)
+
+# define htobe32(x) (x)
+# define htole32(x) __bswap_32 (x)
+# define be32toh(x) (x)
+# define le32toh(x) __bswap_32 (x)
+
+# define htobe64(x) (x)
+# define htole64(x) __bswap_64 (x)
+# define be64toh(x) (x)
+# define le64toh(x) __bswap_64 (x)
+# endif
+
#define cpu_to_le16(x) htole16(x)
#define cpu_to_le32(x) htole32(x)
#define le32_to_cpu(x) le32toh(x)
--
2.11.0
recipes-nemomobile/buteo/buteo-mtp/0006-FSStoragePlugin-Make-sure-the-inotify_event-s-flexib.patch
0 → 100644
View file @
3c03cae2
From 50640967bb2b7906e8aed835fd9932d20fafc91b Mon Sep 17 00:00:00 2001
From: Florent Revest <revestflo@gmail.com>
Date: Wed, 24 May 2017 21:22:02 +0200
Subject: [PATCH 2/2] FSStoragePlugin: Make sure the inotify_event's flexible
array is placed at the end of class
---
mts/platform/storage/fsstorageplugin/fsstorageplugin.h | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/mts/platform/storage/fsstorageplugin/fsstorageplugin.h b/mts/platform/storage/fsstorageplugin/fsstorageplugin.h
index 7f6ea74..3c15430 100644
--- a/mts/platform/storage/fsstorageplugin/fsstorageplugin.h
+++ b/mts/platform/storage/fsstorageplugin/fsstorageplugin.h
@@ -405,12 +405,6 @@
private:
QHash<MTPObjFormatCode, QString> m_imageMimeTable; ///< Maps the MTP object format code (for image types only) to MIME type string
QString m_mtpPersistentDBPath;
MtpInt128 m_largestPuoid;
- struct INotifyCache
- {
- struct inotify_event fromEvent;
- QString fromName;
- }m_iNotifyCache; ///< A cache for iNotify events
-
struct ExistingPlaylists
{
QStringList playlistPaths;
@@ -433,6 +427,13 @@
private:
ObjHandle m_testHandleProvider;
friend class FSStoragePlugin_test;
#endif
+ struct INotifyCache
+ {
+ QString fromName;
+ struct inotify_event fromEvent;
+ }m_iNotifyCache; ///< A cache for iNotify events
+
+
};
}
--
2.11.0
recipes-nemomobile/buteo/buteo-mtp_git.bb
View file @
3c03cae2
...
...
@@ -7,7 +7,9 @@ SRC_URI = "git://git.merproject.org/mer-core/buteo-mtp.git;protocol=https \
file://0001-Remove-dependency-to-SSU-and-tests.patch \
file://0002-Start-buteo-mtp-as-ceres-by-default.patch \
file://0003-Fixes-some-dependencies-to-contextkit-bash-and-syste.patch \
file://0004-fsstorageplugin-Expose-Watch-Memory-instead-of-Phone.patch"
file://0004-fsstorageplugin-Expose-Watch-Memory-instead-of-Phone.patch \
file://0005-mtp1descriptors-redine-htole16-htole32.-to-make-sure.patch \
file://0006-FSStoragePlugin-Make-sure-the-inotify_event-s-flexib.patch"
SRCREV = "394df0cedd490f79b6eb2f4a22a2e2813d129432"
PR = "r1"
PV = "+git${SRCPV}"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment