diff --git a/compat/mingw.h b/compat/mingw.h
index fe6ba340437b67237afd8cfdb4cf2a20074d27f7..62eccd33911e2f332dc9d0faf097ecff6d6a7aa6 100644 (file)
--- a/compat/mingw.h
+++ b/compat/mingw.h
#define getpagesize mingw_getpagesize
#endif
+struct rlimit {
+ unsigned int rlim_cur;
+};
+#define RLIMIT_NOFILE 0
+
+static inline int getrlimit(int resource, struct rlimit *rlp)
+{
+ if (resource != RLIMIT_NOFILE) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ rlp->rlim_cur = 2048;
+ return 0;
+}
+
/* Use mingw_lstat() instead of lstat()/stat() and
* mingw_fstat() instead of fstat() on Windows.
*/