Skip to content

Commit

Permalink
Disable some advanced (post glibc-2.3) libuv features when snapshotti…
Browse files Browse the repository at this point in the history
…ng rust.
  • Loading branch information
graydon committed Mar 26, 2012
1 parent 1170ffb commit 1d6aec9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/unix/eio/config_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
#define HAVE_MEMORY_H 1

/* pread(2) and pwrite(2) are available */
#if !defined(RUST_SNAPSHOT)
#define HAVE_PREADWRITE 1
#endif

/* readahead(2) is available (linux) */
#define HAVE_READAHEAD 1
Expand All @@ -44,7 +46,7 @@
#define HAVE_STRING_H 1

/* sync_file_range(2) is available if kernel >= 2.6.17 and glibc >= 2.6 */
#if LINUX_VERSION_CODE >= 0x020611 && __GLIBC_PREREQ(2, 6)
#if LINUX_VERSION_CODE >= 0x020611 && __GLIBC_PREREQ(2, 6) && !defined(RUST_SNAPSHOT)
#define HAVE_SYNC_FILE_RANGE 1
#else
#define HAVE_SYNC_FILE_RANGE 0
Expand Down
8 changes: 4 additions & 4 deletions src/unix/ev/config_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@
#define HAVE_DLFCN_H 1

/* epoll_ctl(2) is available if kernel >= 2.6.9 and glibc >= 2.4 */
#if LINUX_VERSION_CODE >= 0x020609 && __GLIBC_PREREQ(2, 4)
#if LINUX_VERSION_CODE >= 0x020609 && __GLIBC_PREREQ(2, 4) && !defined(RUST_SNAPSHOT)
#define HAVE_EPOLL_CTL 1
#else
#define HAVE_EPOLL_CTL 0
#endif

/* eventfd(2) is available if kernel >= 2.6.22 and glibc >= 2.8 */
#if LINUX_VERSION_CODE >= 0x020616 && __GLIBC_PREREQ(2, 8)
#if LINUX_VERSION_CODE >= 0x020616 && __GLIBC_PREREQ(2, 8) && !defined(RUST_SNAPSHOT)
#define HAVE_EVENTFD 1
#else
#define HAVE_EVENTFD 0
#endif

/* inotify_init(2) is available if kernel >= 2.6.13 and glibc >= 2.4 */
#if LINUX_VERSION_CODE >= 0x02060d && __GLIBC_PREREQ(2, 4)
#if LINUX_VERSION_CODE >= 0x02060d && __GLIBC_PREREQ(2, 4) && !defined(RUST_SNAPSHOT)
#define HAVE_INOTIFY_INIT 1
#else
#define HAVE_INOTIFY_INIT 0
Expand Down Expand Up @@ -68,7 +68,7 @@
#define HAVE_SELECT 1

/* signalfd(2) is available if kernel >= 2.6.22 and glibc >= 2.8 */
#if LINUX_VERSION_CODE >= 0x020616 && __GLIBC_PREREQ(2, 8)
#if LINUX_VERSION_CODE >= 0x020616 && __GLIBC_PREREQ(2, 8) && !defined(RUST_SNAPSHOT)
#define HAVE_SIGNALFD 1
#else
#define HAVE_SIGNALFD 0
Expand Down

0 comments on commit 1d6aec9

Please sign in to comment.