Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
minimum-linux_p.h
Go to the documentation of this file.
1// Copyright (C) 2017 Intel Corporation.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef MINIMUMLINUX_P_H
6#define MINIMUMLINUX_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19// EXTRA WARNING
20// -------------
21//
22// This file must also be valid assembler source.
23//
24
25#include "private/qglobal_p.h"
26#include <sys/stat.h>
27
29
30/* Minimum Linux kernel version:
31 * We require the following features in Qt (unconditional, no fallback):
32 * Feature Added in version Macro
33 * - inotify_init1 before 2.6.12-rc12
34 * - futex(2) before 2.6.12-rc12
35 * - FUTEX_WAKE_OP 2.6.14 FUTEX_OP
36 * - linkat(2) 2.6.17 O_TMPFILE && QT_CONFIG(linkat)
37 * - FUTEX_PRIVATE_FLAG 2.6.22
38 * - O_CLOEXEC 2.6.23
39 * - eventfd 2.6.23
40 * - FUTEX_WAIT_BITSET 2.6.25
41 * - pipe2 & dup3 2.6.27
42 * - accept4 2.6.28
43 * - renameat2 3.16 QT_CONFIG(renameat2)
44 * - getrandom 3.17 QT_CONFIG(getentropy)
45 * - statx 4.11 STATX_BASIC_STATS
46 */
47
48#if defined(__GLIBC__) && defined(STATX_BASIC_STATS)
49// if using glibc, the statx() function in sysdeps/unix/sysv/linux/statx.c
50// falls back to stat() for us.
51# define QT_ELF_NOTE_OS_MAJOR 4
52# define QT_ELF_NOTE_OS_MINOR 11
53# define QT_ELF_NOTE_OS_PATCH 0
54#elif QT_CONFIG(getentropy)
55# define QT_ELF_NOTE_OS_MAJOR 3
56# define QT_ELF_NOTE_OS_MINOR 17
57# define QT_ELF_NOTE_OS_PATCH 0
58#elif QT_CONFIG(renameat2)
59# define QT_ELF_NOTE_OS_MAJOR 3
60# define QT_ELF_NOTE_OS_MINOR 16
61# define QT_ELF_NOTE_OS_PATCH 0
62#else
63# define QT_ELF_NOTE_OS_MAJOR 2
64# define QT_ELF_NOTE_OS_MINOR 6
65# define QT_ELF_NOTE_OS_PATCH 28
66#endif
67
68/* you must include <elf.h> */
69#define QT_ELF_NOTE_OS_TYPE ELF_NOTE_OS_LINUX
70
72
73#endif // MINIMUMLINUX_P_H
\inmodule QtSql