Drop legacy glibc version check and inclusion of linux/memfd.h (#35748)

This commit is contained in:
Yu Watanabe
2024-12-25 13:58:02 +09:00
committed by GitHub
4 changed files with 3 additions and 13 deletions

View File

@@ -771,7 +771,6 @@ if not cc.has_header('sys/capability.h')
endif
foreach header : ['crypt.h',
'linux/ioprio.h',
'linux/memfd.h',
'linux/time_types.h',
'sys/auxv.h',
'sys/sdt.h',

View File

@@ -1,13 +1,10 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <errno.h>
#include <sys/stat.h>
#include <unistd.h>
#if HAVE_LINUX_MEMFD_H
#include <linux/memfd.h>
#endif
#include <stdio.h>
#include <sys/prctl.h>
#include <sys/stat.h>
#include <unistd.h>
#include "alloc-util.h"
#include "errno-util.h"

View File

@@ -5,9 +5,7 @@
#if HAVE_THREADS_H
# include <threads.h>
#elif !(defined(thread_local))
/* Don't break on glibc < 2.16 that doesn't define __STDC_NO_THREADS__
* see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53769 */
# if __STDC_VERSION__ >= 201112L && !(defined(__STDC_NO_THREADS__) || (defined(__GNU_LIBRARY__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 16))
# if __STDC_VERSION__ >= 201112L && !(defined(__STDC_NO_THREADS__))
# define thread_local _Thread_local
# else
# define thread_local __thread

View File

@@ -1,9 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#if HAVE_LINUX_MEMFD_H
#include <linux/memfd.h>
#endif
#include <sys/mman.h>
#include <sys/quota.h>
#include <sys/vfs.h>