summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorTimur <timur@FreeBSD.org>2008-09-15 18:45:10 -0700
committerJeremy Allison <jra@samba.org>2008-09-15 18:45:10 -0700
commit4dfa72423ef96b411e797eb1b5b4cb3ebd8e3d32 (patch)
tree69251d404ed9c4050cf4ca59bf9ef28d1dbcd86b /source3/smbd
parenta664cf7658b5295547983984ded6467de109f318 (diff)
downloadsamba-4dfa72423ef96b411e797eb1b5b4cb3ebd8e3d32.tar.gz
samba-4dfa72423ef96b411e797eb1b5b4cb3ebd8e3d32.tar.bz2
samba-4dfa72423ef96b411e797eb1b5b4cb3ebd8e3d32.zip
Fix aio on FreeBSD.
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/aio.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c
index 74275368bd..c3fd0a2bc0 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 "