[kwin] Fix build with future glibc (major/minor macros)

Review Request #127662 - Created April 16, 2016 and submitted

Information
Andreas Sturmlechner
kwin
Reviewers
kwin

...where sys/sysmacros.h is going to be removed from sys/types.h

See also: https://sourceware.org/ml/libc-alpha/2015-11/msg00452.html

builds fine with older glibc (tested with glibc-2.21) as well as a patched glibc-2.23 with the removal already implemented.

Andreas Sturmlechner
Martin Flöser
Andreas Sturmlechner
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 03f4f972d6c3ed03eab04c889248d089d317d370 by Andreas Sturmlechner to branch master.
Martin Flöser

I just reverted this change as it breaks on FreeBSD.

  1. Have BSD try:

    ifndef major

    include <sys/sysmacros.h>

    endif

  2. I'm thinking of trying to check in CMake whether the sysmacros.h is available.

  3. FreeBSD would want:

    #include <sys/types.h>  // It's not implicitly included from all over
    #ifndef major
    #include <sys/sysmacros.h>  // GLibC moved #define major
    #endif
    
Loading...