<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -7,13 +7,29 @@ Make sure your libevent has epoll (Linux) or kqueue (BSD) support.
 Using poll or select only is slow, and works for testing, but
 shouldn't be used for high-traffic memcache installations.
 
-To build libevent with epoll on Linux, you need:
+To build libevent with epoll on Linux, you need two things. First,
+you need /usr/include/sys/epoll.h . To get it, you can install the
+userspace epoll library, epoll-lib. The link to the latest version
+is buried inside
+http://www.xmailserver.org/linux-patches/nio-improve.html ; currently
+it's http://www.xmailserver.org/linux-patches/epoll-lib-0.9.tar.gz .
+If you're having any trouble building/installing it, you can just copy
+epoll.h from that tarball to /usr/include/sys as that's the only thing
+from there that libevent really needs.
+
+Secondly, you need to declare syscall numbers of epoll syscalls, so
+libevent can use them. Put these declarations somewhere
+inside &lt;sys/epoll.h&gt;:
 
 #define __NR_epoll_create               254
 #define __NR_epoll_ctl          255
 #define __NR_epoll_wait         256
 
-One okay (but not ideal) place to shove them is /usr/include/asm/unistd.h
+After this you should be able to build libevent with epoll support.
+Once you build/install libevent, you don't need &lt;sys/epoll.h&gt; to
+compile memcache or link it against libevent. Don't forget that for epoll
+support to actually work at runtime you need to use a kernel with epoll
+support patch applied, as explained in the README file.
 
 BSD users are luckier, and will get kqueue support by default.
 </diff>
      <filename>BUILD</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>bfebefb716288ad5490e38172856245e1544e504</id>
    </parent>
  </parents>
  <author>
    <name>Brad Fitzpatrick</name>
    <email>brad@danga.com</email>
  </author>
  <url>http://github.com/steveyen/moxi/commit/2c35a3fddc589a4a047336aa05f290df44b2da8a</url>
  <id>2c35a3fddc589a4a047336aa05f290df44b2da8a</id>
  <committed-date>2003-07-31T16:37:04-07:00</committed-date>
  <authored-date>2003-07-31T16:37:04-07:00</authored-date>
  <message>better build instructions


git-svn-id: http://code.sixapart.com/svn/memcached/trunk@81 b0b603af-a30f-0410-a34e-baf09ae79d0b</message>
  <tree>90292b55a4b4329a5e90df47bcb2b28a659f7e6b</tree>
  <committer>
    <name>Brad Fitzpatrick</name>
    <email>brad@danga.com</email>
  </committer>
</commit>
