mirror of
https://github.com/flatpak/flatpak.git
synced 2026-03-29 12:23:17 -04:00
missing: Add a wrapper for close_range()
This is not the same as systemd's, because systemd's disagrees with glibc on the signedness of the arguments (https://github.com/systemd/systemd/issues/31270). Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
@@ -224,3 +224,15 @@ G_STATIC_ASSERT(__NR_close_range == systemd_NR_close_range);
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_CLOSE_RANGE) && defined(__NR_close_range)
|
||||
static inline int
|
||||
inline_close_range (unsigned int low,
|
||||
unsigned int high,
|
||||
int flags)
|
||||
{
|
||||
return syscall (__NR_close_range, low, high, flags);
|
||||
}
|
||||
#define close_range(low, high, flags) inline_close_range(low, high, flags)
|
||||
#define HAVE_CLOSE_RANGE
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user