Hello community,

here is the log from the commit of package solid for openSUSE:Factory checked 
in at 2017-06-01 16:22:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/solid (Old)
 and      /work/SRC/openSUSE:Factory/.solid.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "solid"

Thu Jun  1 16:22:25 2017 rev:43 rq:495082 version:5.34.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/solid/solid.changes      2017-04-30 
21:22:23.985373715 +0200
+++ /work/SRC/openSUSE:Factory/.solid.new/solid.changes 2017-06-01 
16:22:26.470208005 +0200
@@ -1,0 +2,13 @@
+Mon May 15 13:53:11 CEST 2017 - [email protected]
+
+- Update to 5.34.0
+  * New feature release
+  * For more details please see:
+  * https://www.kde.org/announcements/kde-frameworks-5.34.0.php
+- Changes since 5.33.0:
+  * Adding files missing from last commit.
+  * Fix incorrect definition of major(3)/minor(3) macros.
+  * cmake: stop documenting non-existing variables
+  * Add include that is needed in msys2
+
+-------------------------------------------------------------------

Old:
----
  solid-5.33.0.tar.xz

New:
----
  solid-5.34.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ solid.spec ++++++
--- /var/tmp/diff_new_pack.8PqMxl/_old  2017-06-01 16:22:27.070123410 +0200
+++ /var/tmp/diff_new_pack.8PqMxl/_new  2017-06-01 16:22:27.070123410 +0200
@@ -18,9 +18,9 @@
 
 %bcond_without lang
 %define lname   libKF5Solid5
-%define _tar_path 5.33
+%define _tar_path 5.34
 Name:           solid
-Version:        5.33.0
+Version:        5.34.0
 Release:        0
 BuildRequires:  bison
 BuildRequires:  cmake >= 3.0

++++++ solid-5.33.0.tar.xz -> solid-5.34.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/solid-5.33.0/CMakeLists.txt 
new/solid-5.34.0/CMakeLists.txt
--- old/solid-5.33.0/CMakeLists.txt     2017-04-01 21:45:21.000000000 +0200
+++ new/solid-5.34.0/CMakeLists.txt     2017-05-06 14:04:24.000000000 +0200
@@ -1,11 +1,11 @@
 
 cmake_minimum_required(VERSION 3.0)
 
-set(KF5_VERSION "5.33.0") # handled by release scripts
+set(KF5_VERSION "5.34.0") # handled by release scripts
 project(Solid VERSION ${KF5_VERSION})
 
 include(FeatureSummary)
-find_package(ECM 5.33.0  NO_MODULE)
+find_package(ECM 5.34.0  NO_MODULE)
 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake 
Modules." URL 
"https://projects.kde.org/projects/kdesupport/extra-cmake-modules";)
 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/solid-5.33.0/KF5SolidConfig.cmake.in 
new/solid-5.34.0/KF5SolidConfig.cmake.in
--- old/solid-5.33.0/KF5SolidConfig.cmake.in    2017-04-01 21:45:21.000000000 
+0200
+++ new/solid-5.34.0/KF5SolidConfig.cmake.in    2017-05-06 14:04:24.000000000 
+0200
@@ -6,9 +6,7 @@
 #   Solid_VERSION_MINOR - the minor version number of Solid
 #   Solid_VERSION_PATCH - the patch version number of Solid
 #   Solid_INCLUDE_DIRS  - the include directories to use
-#   Solid_HAVE_WINDOWS_WBEM - TRUE if WBEM is supported as backend under 
Windows
 #   Solid_HAVE_UDev         - TRUE if device discovery via udev is supported
-#   Solid_USE_UDisk2        - TRUE is udisk2 is used instead of udisk on UNIX 
systems
 #
 # Additionally, the following imported library targets are created, which may 
be used directly
 # with target_link_libraries():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/solid-5.33.0/autotests/CMakeLists.txt 
new/solid-5.34.0/autotests/CMakeLists.txt
--- old/solid-5.33.0/autotests/CMakeLists.txt   2017-04-01 21:45:21.000000000 
+0200
+++ new/solid-5.34.0/autotests/CMakeLists.txt   2017-05-06 14:04:24.000000000 
+0200
@@ -50,3 +50,23 @@
 )
 ecm_add_test(${solidLogindInhibitionArgument_SRCS} TEST_NAME 
"logindinhibitionargument" LINK_LIBRARIES Qt5::Test KF5Solid_static)
 endif()
+
+set(solidUdisks2Test_SRCS solidudisks2test.cpp fakeUdisks2.cpp)
+ecm_add_test(${solidUdisks2Test_SRCS} TEST_NAME "solidudisks2" LINK_LIBRARIES 
Qt5::Test Qt5::DBus ${LIBS} KF5Solid_static)
+include(CheckSymbolExists)
+check_symbol_exists(major "sys/sysmacros.h" HAVE_SYSMACROS_MAJOR)
+check_symbol_exists(minor "sys/sysmacros.h" HAVE_SYSMACROS_MINOR)
+check_symbol_exists(major "sys/types.h" HAVE_SYSTYPES_MAJOR)
+check_symbol_exists(minor "sys/types.h" HAVE_SYSTYPES_MINOR)
+check_symbol_exists(major "sys/mkdev.h" HAVE_SYSMKDEV_MAJOR)
+check_symbol_exists(minor "sys/mkdev.h" HAVE_SYSMKDEV_MINOR)
+
+target_compile_definitions(solidudisks2 PRIVATE
+  
HAVE_SYSMACROS_MAJOR_MINOR=$<AND:$<BOOL:${HAVE_SYSMACROS_MAJOR}>,$<BOOL:${HAVE_SYSMACROS_MINOR}>>
+)
+target_compile_definitions(solidudisks2 PRIVATE
+  
HAVE_SYSTYPES_MAJOR_MINOR=$<AND:$<BOOL:${HAVE_SYSTYPES_MAJOR}>,$<BOOL:${HAVE_SYSTYPES_MINOR}>>
+)
+target_compile_definitions(solidudisks2 PRIVATE
+  
HAVE_SYSMKDEV_MAJOR_MINOR=$<AND:$<BOOL:${HAVE_SYSMKDEV_MAJOR}>,$<BOOL:${HAVE_SYSMKDEV_MINOR}>>
+)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/solid-5.33.0/autotests/fakeUdisks2.cpp 
new/solid-5.34.0/autotests/fakeUdisks2.cpp
--- old/solid-5.33.0/autotests/fakeUdisks2.cpp  1970-01-01 01:00:00.000000000 
+0100
+++ new/solid-5.34.0/autotests/fakeUdisks2.cpp  2017-05-06 14:04:24.000000000 
+0200
@@ -0,0 +1,37 @@
+/*
+    Copyright 2017 Konstantinos Tsanaktsidis <[email protected]>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) version 3, or any
+    later version accepted by the membership of KDE e.V. (or its
+    successor approved by the membership of KDE e.V.), which shall
+    act as a proxy defined in Section 6 of version 3 of the license.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library. If not, see 
<http://www.gnu.org/licenses/>.
+*/
+
+#include "fakeUdisks2.h"
+
+FakeUdisks2BlockDevice::FakeUdisks2BlockDevice(QObject *parent, const QString 
&device, quint64 device_number)
+    : QDBusAbstractAdaptor(parent), m_device(device), 
m_device_number(device_number)
+{
+
+}
+
+const QString &FakeUdisks2BlockDevice::device()
+{
+    return m_device;
+}
+
+quint64 FakeUdisks2BlockDevice::device_number()
+{
+    return m_device_number;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/solid-5.33.0/autotests/fakeUdisks2.h 
new/solid-5.34.0/autotests/fakeUdisks2.h
--- old/solid-5.33.0/autotests/fakeUdisks2.h    1970-01-01 01:00:00.000000000 
+0100
+++ new/solid-5.34.0/autotests/fakeUdisks2.h    2017-05-06 14:04:24.000000000 
+0200
@@ -0,0 +1,43 @@
+/*
+    Copyright 2017 Konstantinos Tsanaktsidis <[email protected]>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) version 3, or any
+    later version accepted by the membership of KDE e.V. (or its
+    successor approved by the membership of KDE e.V.), which shall
+    act as a proxy defined in Section 6 of version 3 of the license.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library. If not, see 
<http://www.gnu.org/licenses/>.
+*/
+
+#ifndef SOLID_FAKE_UDISKS2
+#define SOLID_FAKE_UDISKS2
+
+#include <QString>
+#include <QDBusAbstractAdaptor>
+#include <QDBusObjectPath>
+
+class FakeUdisks2BlockDevice : public QDBusAbstractAdaptor
+{
+    Q_OBJECT
+    Q_CLASSINFO("D-Bus Interface", "org.freedesktop.UDisks2.Block")
+    Q_PROPERTY(QString Device READ device)
+    Q_PROPERTY(quint64 DeviceNumber READ device_number)
+public:
+    FakeUdisks2BlockDevice(QObject *parent, const QString &device, quint64 
device_number);
+
+    const QString &device();
+    QString m_device;
+    quint64 device_number();
+    quint64 m_device_number;
+};
+
+#endif // SOLID_FAKE_UDISKS2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/solid-5.33.0/autotests/solidudisks2test.cpp 
new/solid-5.34.0/autotests/solidudisks2test.cpp
--- old/solid-5.33.0/autotests/solidudisks2test.cpp     1970-01-01 
01:00:00.000000000 +0100
+++ new/solid-5.34.0/autotests/solidudisks2test.cpp     2017-05-06 
14:04:24.000000000 +0200
@@ -0,0 +1,118 @@
+/*
+    Copyright 2017 Konstantinos Tsanaktsidis <[email protected]>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) version 3, or any
+    later version accepted by the membership of KDE e.V. (or its
+    successor approved by the membership of KDE e.V.), which shall
+    act as a proxy defined in Section 6 of version 3 of the license.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library. If not, see 
<http://www.gnu.org/licenses/>.
+*/
+
+#include "qtest_dbus.h"
+#include "fakeUdisks2.h"
+
+#include <QTest>
+#include <QDBusConnection>
+#include <Solid/Device>
+#include <Solid/Block>
+#include <Solid/Predicate>
+#include <Solid/DeviceNotifier>
+
+#if HAVE_SYSMACROS_MAJOR_MINOR
+#include <sys/sysmacros.h>
+#elif HAVE_SYSTYPES_MAJOR_MINOR
+#include <sys/types.h>
+#elif HAVE_SYSMKDEV_MAJOR_MINOR
+#include <sys/mkdev.h>
+#else
+#error "Could not find a major/minor/makedev implementation"
+#endif
+
+static Solid::Predicate majorMinorPredicate(quint32 majorNum, quint32 minorNum)
+{
+    Solid::Predicate hasMajorMinor(
+        Solid::DeviceInterface::Type::Block,
+        QStringLiteral("major"),
+        QVariant(majorNum),
+        Solid::Predicate::ComparisonOperator::Equals
+    );
+    hasMajorMinor &= Solid::Predicate(
+        Solid::DeviceInterface::Type::Block,
+        QStringLiteral("minor"),
+        QVariant(minorNum),
+        Solid::Predicate::ComparisonOperator::Equals
+    );
+    return hasMajorMinor;
+}
+
+
+class SolidUdisks2Test : public QObject
+{
+    Q_OBJECT
+private Q_SLOTS:
+    void initTestCase();
+    void testDeviceNumbersAreDecomposed();
+    void testLargeDeviceNumbersAreDecomposed();
+
+private:
+    FakeUdisks2BlockDevice *m_deviceSda1;
+    FakeUdisks2BlockDevice *m_deviceNvme0n1p2;
+    QObject *m_emptyDbus;
+};
+
+void SolidUdisks2Test::initTestCase()
+{
+    m_deviceSda1 = new FakeUdisks2BlockDevice(this, "sda1", makedev(8, 1));
+    m_deviceNvme0n1p2 = new FakeUdisks2BlockDevice(this, "nvme0n1p2", 
makedev(259, 2));
+    m_emptyDbus = new QObject(this);
+    
QDBusConnection::systemBus().registerService(QStringLiteral("org.freedesktop.UDisks2"));
+    
QDBusConnection::systemBus().registerObject(QStringLiteral("/org/freedesktop/UDisks2/block_devices/sda1"),
 m_deviceSda1, QDBusConnection::ExportAllContents);
+    
QDBusConnection::systemBus().registerObject(QStringLiteral("/org/freedesktop/UDisks2/block_devices/nvme0n1p2"),
 m_deviceNvme0n1p2, QDBusConnection::ExportAllContents);
+    
QDBusConnection::systemBus().registerObject(QStringLiteral("/org/freedesktop/UDisks2/drives"),
 m_emptyDbus, QDBusConnection::ExportAllContents);
+}
+
+void SolidUdisks2Test::testDeviceNumbersAreDecomposed()
+{
+    auto hasMajorMinor = majorMinorPredicate(8, 1);
+    QList<Solid::Device> solidSda1BlockDeviceList = 
Solid::Device::listFromQuery(hasMajorMinor);
+    QCOMPARE(solidSda1BlockDeviceList.count(), 1);
+
+    auto solidSda1BlockDevice = dynamic_cast<Solid::Block*>(
+            
solidSda1BlockDeviceList.first().asDeviceInterface(Solid::DeviceInterface::Type::Block)
+    );
+    QVERIFY(solidSda1BlockDevice);
+
+    QCOMPARE(solidSda1BlockDevice->deviceMajor(), 8);
+    QCOMPARE(solidSda1BlockDevice->deviceMinor(), 1);
+}
+
+void SolidUdisks2Test::testLargeDeviceNumbersAreDecomposed()
+{
+    // On Linux, nvme devices have a major number > 255, so take up more than 
8 bits of dev_t
+    // This test checks that the correct glibc routines are being used to 
handle this
+    auto hasMajorMinor = majorMinorPredicate(259, 2);
+    QList<Solid::Device> solidNvme0n1p2BlockDeviceList = 
Solid::Device::listFromQuery(hasMajorMinor);
+    QCOMPARE(solidNvme0n1p2BlockDeviceList.count(), 1);
+
+    auto solidNvme0n1p2BlockDevice = dynamic_cast<Solid::Block*>(
+            
solidNvme0n1p2BlockDeviceList.first().asDeviceInterface(Solid::DeviceInterface::Type::Block)
+    );
+    QVERIFY(solidNvme0n1p2BlockDevice);
+
+    QCOMPARE(solidNvme0n1p2BlockDevice->deviceMajor(), 259);
+    QCOMPARE(solidNvme0n1p2BlockDevice->deviceMinor(), 2);
+}
+
+QTEST_GUILESS_MAIN_SYSTEM_DBUS(SolidUdisks2Test)
+
+#include "solidudisks2test.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/solid-5.33.0/po/bg/solid5_qt.po 
new/solid-5.34.0/po/bg/solid5_qt.po
--- old/solid-5.33.0/po/bg/solid5_qt.po 2017-04-01 21:45:21.000000000 +0200
+++ new/solid-5.34.0/po/bg/solid5_qt.po 2017-05-06 14:04:24.000000000 +0200
@@ -1,5 +1,4 @@
-# translation of solid_qt.po to Bulgarian
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# Copyright (C) YEAR This_file_is_part_of_KDE
 # This file is distributed under the same license as the PACKAGE package.
 #
 # Yasen Pramatarov <[email protected]>, 2010.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/solid-5.33.0/po/de/solid5_qt.po 
new/solid-5.34.0/po/de/solid5_qt.po
--- old/solid-5.33.0/po/de/solid5_qt.po 2017-04-01 21:45:21.000000000 +0200
+++ new/solid-5.34.0/po/de/solid5_qt.po 2017-05-06 14:04:24.000000000 +0200
@@ -9,7 +9,7 @@
 "Project-Id-Version: solid_qt\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2014-04-01 01:49+0000\n"
-"PO-Revision-Date: 2017-02-28 07:08+0100\n"
+"PO-Revision-Date: 2017-04-18 15:09+0100\n"
 "Last-Translator: Burkhard Lück <[email protected]>\n"
 "Language-Team: German <[email protected]>\n"
 "Language: de\n"
@@ -815,12 +815,9 @@
 msgstr "Verschlüsseltes Laufwerk"
 
 #: solid/devices/backends/udisks2/udisksdevice.cpp:577
-#, fuzzy
-#| msgctxt "Solid::Backends::UDisks2::Device|"
-#| msgid "Floppy Drive"
 msgctxt "Solid::Backends::UDisks2::Device|"
 msgid "Floppy Disk"
-msgstr "Diskettenlaufwerk"
+msgstr "Diskette"
 
 #: solid/devices/backends/udisks2/udisksdevice.cpp:580
 #, qt-format
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/solid-5.33.0/po/ia/solid5_qt.po 
new/solid-5.34.0/po/ia/solid5_qt.po
--- old/solid-5.33.0/po/ia/solid5_qt.po 2017-04-01 21:45:21.000000000 +0200
+++ new/solid-5.34.0/po/ia/solid5_qt.po 2017-05-06 14:04:24.000000000 +0200
@@ -7,7 +7,7 @@
 "Project-Id-Version: \n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2014-04-01 01:49+0000\n"
-"PO-Revision-Date: 2017-01-15 22:09+0100\n"
+"PO-Revision-Date: 2017-04-14 23:43+0100\n"
 "Last-Translator: giovanni <[email protected]>\n"
 "Language-Team: Interlingua <[email protected]>\n"
 "Language: ia\n"
@@ -813,9 +813,6 @@
 msgstr "Drive cryptate"
 
 #: solid/devices/backends/udisks2/udisksdevice.cpp:577
-#, fuzzy
-#| msgctxt "Solid::Backends::UDisks2::Device|"
-#| msgid "Floppy Drive"
 msgctxt "Solid::Backends::UDisks2::Device|"
 msgid "Floppy Disk"
 msgstr "Drive de Floppy"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/solid-5.33.0/src/solid/devices/backends/udisks2/CMakeLists.txt 
new/solid-5.34.0/src/solid/devices/backends/udisks2/CMakeLists.txt
--- old/solid-5.33.0/src/solid/devices/backends/udisks2/CMakeLists.txt  
2017-04-01 21:45:21.000000000 +0200
+++ new/solid-5.34.0/src/solid/devices/backends/udisks2/CMakeLists.txt  
2017-05-06 14:04:24.000000000 +0200
@@ -11,4 +11,28 @@
     devices/backends/udisks2/udisksstorageaccess.cpp
     devices/backends/udisks2/udisksgenericinterface.cpp
     devices/backends/udisks2/dbus/manager.cpp
-)
\ No newline at end of file
+)
+
+# We need the major(3) and minor(3) macros to decompose dev_t device ids
+# properly in udisksblock. BSD systems normally have these in sys/types.h.
+# Glibc on Linux has a version in that header, but it spits out a deprecation
+# warning - on Linux, one should use sys/sysmacros.h. Search for these in
+# the relevant headers.
+include(CheckSymbolExists)
+check_symbol_exists(major "sys/sysmacros.h" HAVE_SYSMACROS_MAJOR)
+check_symbol_exists(minor "sys/sysmacros.h" HAVE_SYSMACROS_MINOR)
+check_symbol_exists(major "sys/types.h" HAVE_SYSTYPES_MAJOR)
+check_symbol_exists(minor "sys/types.h" HAVE_SYSTYPES_MINOR)
+check_symbol_exists(major "sys/mkdev.h" HAVE_SYSMKDEV_MAJOR)
+check_symbol_exists(minor "sys/mkdev.h" HAVE_SYSMKDEV_MINOR)
+
+# Set each of these three properties to 0 or 1
+add_definitions(
+  
-DHAVE_SYSMACROS_MAJOR_MINOR=$<AND:$<BOOL:${HAVE_SYSMACROS_MAJOR}>,$<BOOL:${HAVE_SYSMACROS_MINOR}>>
+)
+add_definitions(
+  
-DHAVE_SYSTYPES_MAJOR_MINOR=$<AND:$<BOOL:${HAVE_SYSTYPES_MAJOR}>,$<BOOL:${HAVE_SYSTYPES_MINOR}>>
+)
+add_definitions(
+  
-DHAVE_SYSMKDEV_MAJOR_MINOR=$<AND:$<BOOL:${HAVE_SYSMKDEV_MAJOR}>,$<BOOL:${HAVE_SYSMKDEV_MINOR}>>
+)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/solid-5.33.0/src/solid/devices/backends/udisks2/udisksblock.cpp 
new/solid-5.34.0/src/solid/devices/backends/udisks2/udisksblock.cpp
--- old/solid-5.33.0/src/solid/devices/backends/udisks2/udisksblock.cpp 
2017-04-01 21:45:21.000000000 +0200
+++ new/solid-5.34.0/src/solid/devices/backends/udisks2/udisksblock.cpp 
2017-05-06 14:04:24.000000000 +0200
@@ -18,14 +18,18 @@
     License along with this library. If not, see 
<http://www.gnu.org/licenses/>.
 */
 
-#if defined(Q_OS_LINUX)
-#include <linux/kdev_t.h>
+// Find appropriate major/minor macros - a CMake check tells us
+// where to find these.
+#if HAVE_SYSMACROS_MAJOR_MINOR
+#include <sys/sysmacros.h>
+#elif HAVE_SYSTYPES_MAJOR_MINOR
+#include <sys/types.h>
+#elif HAVE_SYSMKDEV_MAJOR_MINOR
+#include <sys/mkdev.h>
 #else
-// taken from linux/kdev_t.h
-#define MINORBITS       20
-#define MINORMASK       ((1U << MINORBITS) - 1)
-#define MAJOR(dev)      ((unsigned int) ((dev) >> MINORBITS))
-#define MINOR(dev)      ((unsigned int) ((dev) & MINORMASK))
+// Fall back to the traditional definition of major/minor - 8 bits for each.
+#define major(dev)      ((dev) >> 8)
+#define minor(dev)      ((dev) & 0xff)
 #endif
 
 #include <QFile>
@@ -87,10 +91,10 @@
 
 int Block::deviceMinor() const
 {
-    return MINOR(m_devNum);
+    return minor(m_devNum);
 }
 
 int Block::deviceMajor() const
 {
-    return MAJOR(m_devNum);
+    return major(m_devNum);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/solid-5.33.0/src/solid/devices/backends/win/winbattery.cpp 
new/solid-5.34.0/src/solid/devices/backends/win/winbattery.cpp
--- old/solid-5.33.0/src/solid/devices/backends/win/winbattery.cpp      
2017-04-01 21:45:21.000000000 +0200
+++ new/solid-5.34.0/src/solid/devices/backends/win/winbattery.cpp      
2017-05-06 14:04:24.000000000 +0200
@@ -20,6 +20,7 @@
 #include "winbattery.h"
 #include "windevicemanager_p.h"
 
+#include <devpropdef.h>
 #include <setupapi.h>
 #include <batclass.h>
 #include <devguid.h>


Reply via email to