diff options
author | Shigeki Ohtsu <ohtsu@iij.ad.jp> | 2011-07-15 07:38:45 +0400 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2011-07-15 17:41:28 +0400 |
commit | 3c733c57b7974fa9142babbe1515a4823cfde76b (patch) | |
tree | e9573440ca22218cc51bf86d82556967cd45491e /deps | |
parent | e70702c62096860abeab1cc23ffc188850de592b (diff) |
ev: define HAVE_SYNC_FILE_RANGE if kernel >= 2.6.17 *and* glibc version >= 2.6
Diffstat (limited to 'deps')
-rw-r--r-- | deps/uv/src/eio/config_linux.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/deps/uv/src/eio/config_linux.h b/deps/uv/src/eio/config_linux.h index 9823f624085..0bb9162b8a3 100644 --- a/deps/uv/src/eio/config_linux.h +++ b/deps/uv/src/eio/config_linux.h @@ -9,6 +9,11 @@ #define LINUX_VERSION_AT_LEAST(major, minor, patch) \ (LINUX_VERSION_CODE >= LINUX_VERSION_CODE_FOR(major, minor, patch)) +#ifdef __GLIBC__ +#define GLIBC_VERSION_AT_LEAST(major, minor) \ + (__GLIBC__ > major || (__GLIBC__ == major && __GLIBC_MINOR__ >= minor)) +#endif + /* Define to 1 if you have the <dlfcn.h> header file. */ #define HAVE_DLFCN_H 1 @@ -46,7 +51,11 @@ #define HAVE_STRING_H 1 /* sync_file_range(2) is available */ +#ifdef __GLIBC__ +#define HAVE_SYNC_FILE_RANGE (LINUX_VERSION_AT_LEAST(2, 6, 17) && GLIBC_VERSION_AT_LEAST(2, 6)) +#else #define HAVE_SYNC_FILE_RANGE LINUX_VERSION_AT_LEAST(2, 6, 17) +#endif /* Define to 1 if you have the <sys/stat.h> header file. */ #define HAVE_SYS_STAT_H 1 |