mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-01 12:26:38 -05:00
Portability
This commit is contained in:
parent
8eb54554e6
commit
b97eae14b1
2 changed files with 21 additions and 0 deletions
|
|
@ -18,6 +18,9 @@
|
||||||
#define HAVE_AVX2 1
|
#define HAVE_AVX2 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* map Windows name to POSIX name */
|
||||||
|
#define strncasecmp _strnicmp
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
/* file */
|
/* file */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -240,6 +240,24 @@
|
||||||
#define HAVE_LOCKFILE 1
|
#define HAVE_LOCKFILE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_LINUX_CLOSE_RANGE_H
|
||||||
|
#include <linux/close_range.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* implement close_range for glibc 2.33 or earlier */
|
||||||
|
#if defined(__linux__) && !defined(HAVE_CLOSE_RANGE)
|
||||||
|
#include <sys/syscall.h>
|
||||||
|
#ifndef __NR_close_range
|
||||||
|
#define __NR_close_range 436
|
||||||
|
#endif
|
||||||
|
#define close_range close_range_impl
|
||||||
|
static inline int close_range_impl(unsigned int first, unsigned int last, unsigned int flags)
|
||||||
|
{
|
||||||
|
return syscall(__NR_close_range, first, last, flags);
|
||||||
|
}
|
||||||
|
#define HAVE_CLOSE_RANGE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Flags for open()
|
* Flags for open()
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue