KWin
Loading...
Searching...
No Matches
kernel.h
Go to the documentation of this file.
1/*
2 KWin - the KDE window manager
3 This file is part of the KDE project.
4
5 SPDX-FileCopyrightText: 2023 Xaver Hugl <xaver.hugl@gmail.com>
6
7 SPDX-License-Identifier: GPL-2.0-or-later
8*/
9#pragma once
10#include "utils/version.h"
11
12#include <sys/utsname.h>
13
14namespace KWin
15{
16
17inline static Version linuxKernelVersion()
18{
19 struct utsname name;
20 uname(&name);
21
22 if (qstrcmp(name.sysname, "Linux") == 0) {
23 return Version::parseString(name.release);
24 }
25 return Version(0, 0, 0);
26}
27
28}
static Version parseString(QByteArrayView versionString)
Definition version.cpp:44