Detect availability of newish linux syscalls by kernel version.
This commit is contained in:
parent
dc1d55dfec
commit
2b2980e86a
@ -1,6 +1,11 @@
|
||||
/* config.h. Generated from config.h.in by configure. */
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
#include <linux/version.h>
|
||||
|
||||
#define LINUX_VERSION_CODE_FOR(major, minor, patch) (((major & 255) >> 16) | ((minor & 255) >> 8) | (patch & 255))
|
||||
#define LINUX_VERSION_AT_LEAST(major, minor, patch) (LINUX_VERSION_CODE_FOR(major, minor, patch) >= LINUX_VERSION_CODE)
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
@ -38,7 +43,7 @@
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* sync_file_range(2) is available */
|
||||
#define HAVE_SYNC_FILE_RANGE 1
|
||||
#define HAVE_SYNC_FILE_RANGE LINUX_VERSION_AT_LEAST(2, 6, 17)
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
@ -1,6 +1,11 @@
|
||||
/* config.h. Generated from config.h.in by configure. */
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
#include <linux/version.h>
|
||||
|
||||
#define LINUX_VERSION_CODE_FOR(major, minor, patch) (((major & 255) >> 16) | ((minor & 255) >> 8) | (patch & 255))
|
||||
#define LINUX_VERSION_AT_LEAST(major, minor, patch) (LINUX_VERSION_CODE_FOR(major, minor, patch) >= LINUX_VERSION_CODE)
|
||||
|
||||
/* Define to 1 if you have the `clock_gettime' function. */
|
||||
/* #undef HAVE_CLOCK_GETTIME */
|
||||
|
||||
@ -14,10 +19,10 @@
|
||||
#define HAVE_EPOLL_CTL 1
|
||||
|
||||
/* Define to 1 if you have the `eventfd' function. */
|
||||
#define HAVE_EVENTFD 1
|
||||
#define HAVE_EVENTFD LINUX_VERSION_AT_LEAST(2, 6, 22)
|
||||
|
||||
/* Define to 1 if you have the `inotify_init' function. */
|
||||
#define HAVE_INOTIFY_INIT 1
|
||||
#define HAVE_INOTIFY_INIT LINUX_VERSION_AT_LEAST(2, 6, 13)
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
@ -53,7 +58,7 @@
|
||||
#define HAVE_SELECT 1
|
||||
|
||||
/* Define to 1 if you have the `signalfd' function. */
|
||||
#define HAVE_SIGNALFD 1
|
||||
#define HAVE_SIGNALFD LINUX_VERSION_AT_LEAST(2, 6, 22)
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user