Index: src/VBox/Runtime/r3/freebsd/fileaio-freebsd.cpp
===================================================================
--- src/VBox/Runtime/r3/freebsd/fileaio-freebsd.cpp	(revision 37995)
+++ src/VBox/Runtime/r3/freebsd/fileaio-freebsd.cpp	(working copy)
@@ -372,8 +372,12 @@
         size_t i = 0;
         PRTFILEAIOREQINTERNAL pReqInt;
 
+#ifndef AIO_LISTIO_MAX
+#define AIO_LISTIO_MAX sysconf(_SC_AIO_LISTIO_MAX)
+#endif
+
         while (   (i < cReqs)
-               && (i < AIO_LISTIO_MAX))
+               && (AIO_LISTIO_MAX == -1 || i < AIO_LISTIO_MAX))
         {
             pReqInt = pahReqs[i];
             if (RTFILEAIOREQ_IS_NOT_VALID(pReqInt))
