summaryrefslogtreecommitdiff
path: root/eio.c
diff options
context:
space:
mode:
authorroot <root>2010-02-23 14:32:45 +0000
committerroot <root>2010-02-23 14:32:45 +0000
commit6359ca60527c89609cc3bfa9b4d41a59c940717f (patch)
tree526df6924bed19775374c0233d24e388efc65608 /eio.c
parent1570cfb676c3bf30ffc6b22fad128562c4539993 (diff)
*** empty log message ***
Diffstat (limited to 'eio.c')
-rw-r--r--eio.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/eio.c b/eio.c
index 1dfc7a4..937c066 100644
--- a/eio.c
+++ b/eio.c
@@ -139,6 +139,11 @@
# define NAME_MAX 4096
#endif
+/* used for readlink etc. */
+#ifndef PATH_MAX
+# define PATH_MAX 4096
+#endif
+
/* buffer size for various temporary buffers */
#define EIO_BUFSIZE 65536
@@ -1610,8 +1615,8 @@ static void eio_execute (etp_worker *self, eio_req *req)
case EIO_SYMLINK: req->result = symlink (req->ptr1, req->ptr2); break;
case EIO_MKNOD: req->result = mknod (req->ptr1, (mode_t)req->int2, (dev_t)req->int3); break;
- case EIO_READLINK: ALLOC (NAME_MAX);
- req->result = readlink (req->ptr1, req->ptr2, NAME_MAX); break;
+ case EIO_READLINK: ALLOC (PATH_MAX);
+ req->result = readlink (req->ptr1, req->ptr2, PATH_MAX); break;
case EIO_SYNC: req->result = 0; sync (); break;
case EIO_FSYNC: req->result = fsync (req->int1); break;