Fix build with future glibc (major/minor macros), BSD compatible

Summary:
Also adding sys/types.h which is not implicitly included from all over.

Thanks-to: [ade] in #kde-devel

See also:
https://sourceware.org/ml/libc-alpha/2015-11/msg00452.html
https://git.reviewboard.kde.org/r/127662/

BUG: 376505

Reviewers: #plasma, graesslin

Reviewed By: #plasma, graesslin

Subscribers: graesslin, plasma-devel, kwin, #kwin, adridg

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D6175
This commit is contained in:
Andreas Sturmlechner 2017-06-10 17:00:25 +02:00
parent f5f14475b5
commit 35c278e525

View file

@ -29,6 +29,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QDBusMetaType> #include <QDBusMetaType>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h>
#ifndef major
#include <sys/sysmacros.h>
#endif
#include <unistd.h> #include <unistd.h>
#include "utils.h" #include "utils.h"