$OpenBSD: patch-base_files_file_path_watcher_stub_cc,v 1.1 2011/06/08 20:36:56 robert Exp $
--- base/files/file_path_watcher_stub.cc.orig	Wed Jun  8 17:00:41 2011
+++ base/files/file_path_watcher_stub.cc	Wed Jun  8 17:14:41 2011
@@ -2,24 +2,76 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// This file exists for Unix systems which don't have the inotify headers, and
-// thus cannot build file_watcher_inotify.cc
-
 #include "base/files/file_path_watcher.h"
 
+#include <errno.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <sys/select.h>
+#include <unistd.h>
+
+#include <algorithm>
+#include <set>
+#include <utility>
+#include <vector>
+
+#include "base/eintr_wrapper.h"
+#include "base/file_path.h"
+#include "base/file_util.h"
+#include "base/hash_tables.h"
+#include "base/lazy_instance.h"
+#include "base/logging.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/message_loop.h"
+#include "base/message_loop_proxy.h"
+#include "base/synchronization/lock.h"
+#include "base/task.h"
+#include "base/threading/thread.h"
+
 namespace base {
 namespace files {
 
 namespace {
 
-class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate {
+class FilePathWatcherImpl;
+
+class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate,
+                            public MessageLoop::DestructionObserver {
  public:
+  FilePathWatcherImpl();
+
   virtual bool Watch(const FilePath& path,
-                     FileWatcher::Delegate* delegate,
-                     base::MessageLoopProxy*) OVERRIDE {
-    return false;
-  }
+                     FilePathWatcher::Delegate* delegate) OVERRIDE;
+
+  virtual void Cancel() OVERRIDE;
+
+  virtual void WillDestroyCurrentMessageLoop() OVERRIDE;
+
+ private:
+  virtual ~FilePathWatcherImpl() {}
+
+  void CancelOnMessageLoopThread() OVERRIDE;
+
+  DISALLOW_COPY_AND_ASSIGN(FilePathWatcherImpl);
 };
+
+FilePathWatcherImpl::FilePathWatcherImpl() {
+}
+
+bool FilePathWatcherImpl::Watch(const FilePath& path,
+                                FilePathWatcher::Delegate* delegate) {
+  return false;
+}
+
+void FilePathWatcherImpl::Cancel() {
+}
+
+void FilePathWatcherImpl::CancelOnMessageLoopThread() {
+}
+
+void FilePathWatcherImpl::WillDestroyCurrentMessageLoop() {
+  CancelOnMessageLoopThread();
+}
 
 }  // namespace
 
