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