From c41c3f9bca017d4286b026289e8c562c9e558854 Mon Sep 17 00:00:00 2001 From: Marcus Overhagen Date: Sat, 7 Jul 2007 00:36:11 +0000 Subject: [PATCH] gcc4 compile fix, but C++ predicates are ugly git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21579 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/storage/PathMonitor.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/kits/storage/PathMonitor.cpp b/src/kits/storage/PathMonitor.cpp index 3212798834..8485f32f51 100644 --- a/src/kits/storage/PathMonitor.cpp +++ b/src/kits/storage/PathMonitor.cpp @@ -40,12 +40,27 @@ using namespace std; namespace BPrivate { +#if __GNUC__ > 3 + bool operator<(const node_ref& a, const node_ref& b); + class node_ref_less : public binary_function + { + public: + bool operator() (const node_ref& a, const node_ref& b) const + { + return a < b; + } + }; + typedef set FileSet; +#else + typedef set FileSet; +#endif + struct watched_directory { node_ref node; bool contained; }; typedef set DirectorySet; -typedef set FileSet; + class PathHandler; typedef map HandlerMap;