[SCM] Samba Shared Repository - branch master updated - 4dfa72423ef96b411e797eb1b5b4cb3ebd8e3d32

Jeremy Allison jra at samba.org
Tue Sep 16 01:46:25 GMT 2008


The branch, master has been updated
       via  4dfa72423ef96b411e797eb1b5b4cb3ebd8e3d32 (commit)
      from  a664cf7658b5295547983984ded6467de109f318 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 4dfa72423ef96b411e797eb1b5b4cb3ebd8e3d32
Author: Timur <timur at FreeBSD.org>
Date:   Mon Sep 15 18:45:10 2008 -0700

    Fix aio on FreeBSD.

-----------------------------------------------------------------------

Summary of changes:
 source3/configure.in |   15 +++++++++++++++
 source3/smbd/aio.c   |   17 ++++++++++++++++-
 2 files changed, 31 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index 248c39a..d9766e4 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -876,6 +876,21 @@ if test x"$samba_cv_sig_atomic_t" = x"yes"; then
    AC_DEFINE(HAVE_SIG_ATOMIC_T_TYPE,1,[Whether we have the atomic_t variable type])
 fi
 
+AC_CACHE_CHECK([for struct sigevent type],samba_cv_struct_sigevent, [
+    AC_TRY_COMPILE([
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#include <signal.h>],[struct sigevent s;],
+	samba_cv_struct_sigevent=yes,samba_cv_struct_sigevent=no)])
+if test x"$samba_cv_struct_sigevent" = x"yes"; then
+   AC_DEFINE(HAVE_STRUCT_SIGEVENT,1,[Whether we have the struct sigevent])
+   AC_CHECK_MEMBERS([struct sigevent.sigev_value.sival_ptr,struct sigevent.sigev_value.sigval_ptr], , ,
+	[#include <signal.h>])
+fi
+
 AC_CACHE_CHECK([for struct timespec type],samba_cv_struct_timespec, [
     AC_TRY_COMPILE([
 #include <sys/types.h>
diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c
index 7427536..c3fd0a2 100644
--- a/source3/smbd/aio.c
+++ b/source3/smbd/aio.c
@@ -24,7 +24,17 @@
 
 /* The signal we'll use to signify aio done. */
 #ifndef RT_SIGNAL_AIO
-#define RT_SIGNAL_AIO (SIGRTMIN+3)
+#ifndef SIGRTMIN
+#define SIGRTMIN	NSIG
+#endif
+#define RT_SIGNAL_AIO	(SIGRTMIN+3)
+#endif
+
+#ifndef HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIVAL_PTR
+#ifdef HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIGVAL_PTR
+#define sival_int	sigval_int
+#define sival_ptr	sigval_ptr
+#endif
 #endif
 
 /****************************************************************************
@@ -581,6 +591,11 @@ static bool handle_aio_completed(struct aio_extra *aio_ex, int *perr)
 {
 	int err;
 
+	if(!aio_ex) {
+	        DEBUG(3, ("handle_aio_completed: Non-existing aio_ex passed\n"));
+		return false;
+	}
+
 	/* Ensure the operation has really completed. */
 	if (SMB_VFS_AIO_ERROR(aio_ex->fsp, &aio_ex->acb) == EINPROGRESS) {
 		DEBUG(10,( "handle_aio_completed: operation mid %u still in "


-- 
Samba Shared Repository


More information about the samba-cvs mailing list