Blob Blame History Raw
Submitted upstream: <https://sourceforge.net/p/beecrypt/patches/12/>

diff --git a/acinclude.m4 b/acinclude.m4
index 7df3867..2e0a41c 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -320,6 +320,9 @@ EOF
             #if HAVE_FCNTL_H
             # include <fcntl.h>
             #endif
+            #if HAVE_TIME_H
+            # include <time.h>
+            #endif
             #if HAVE_STRING_H
             # include <string.h>
             #endif
@@ -338,7 +341,7 @@ EOF
               int i, rc, fd = open("conftest.aio", O_RDONLY);
 
               if (fd < 0)
-                exit(1);
+                return 1;
 
               memset(&a, 0, sizeof(struct aiocb));
 
@@ -355,7 +358,7 @@ EOF
               if (aio_read(&a) < 0)
               {
                 perror("aio_read");
-                exit(1);
+                return 1;
               }
               if (aio_suspend(&a_list, 1, &a_timeout) < 0)
               {
@@ -368,25 +371,25 @@ EOF
                   if (aio_suspend(&a_list, 1, &a_timeout) < 0)
                   {
                     perror("aio_suspend");
-                    exit(1);
+                    return 1;
                   }
                 }
                 else
                 {
                   perror("aio_suspend");
-                  exit(1);
+                  return 1;
                 }
                 #else
-                exit(1);
+                return 1;
                 #endif
               }
               if (aio_error(&a) < 0)
-                exit(1);
+                return 1;
 
               if (aio_return(&a) < 0)
-                exit(1);
+                return 1;
 
-              exit(0);
+              return 0;
           ]])],[bc_cv_working_aio=yes],[bc_cv_working_aio=no],[
             case $target_os in
               linux* | solaris*)