From 85b93853e05c6e8795fab2f0b9ad7381d5398af6 Mon Sep 17 00:00:00 2001 From: Aleksandar Fabijanic Date: Mon, 1 Oct 2012 02:10:16 +0000 Subject: [PATCH] FreeBSD fixes --- Foundation/src/DirectoryWatcher.cpp | 3 +++ Foundation/src/Thread_POSIX.cpp | 2 +- build/rules/global | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Foundation/src/DirectoryWatcher.cpp b/Foundation/src/DirectoryWatcher.cpp index 62860c92a..5eb1ab9cd 100644 --- a/Foundation/src/DirectoryWatcher.cpp +++ b/Foundation/src/DirectoryWatcher.cpp @@ -408,6 +408,9 @@ public: _dirFD(-1), _stopped(false) { +#ifndef O_EVTONLY + #define O_EVTONLY 0x8000 +#endif _dirFD = open(owner.directory().path().c_str(), O_EVTONLY); if (_dirFD < 0) throw Poco::FileNotFoundException(owner.directory().path()); _queueFD = kqueue(); diff --git a/Foundation/src/Thread_POSIX.cpp b/Foundation/src/Thread_POSIX.cpp index e0b5ca5bc..b2a9e3b07 100644 --- a/Foundation/src/Thread_POSIX.cpp +++ b/Foundation/src/Thread_POSIX.cpp @@ -160,7 +160,7 @@ void ThreadImpl::setStackSizeImpl(int size) #else if (size != 0) { -#if defined(__APPLE__) +#if defined(POCO_OS_FAMILY_BSD) // we must round up to a multiple of the memory page size const int PAGE_SIZE = 4096; size = ((size + PAGE_SIZE - 1)/PAGE_SIZE)*PAGE_SIZE; diff --git a/build/rules/global b/build/rules/global index d76b67ace..c26b9e0a4 100644 --- a/build/rules/global +++ b/build/rules/global @@ -54,10 +54,10 @@ export POCO_BUILD cwd = $(shell pwd) inpoco = $(shell echo | awk '{print index("$(cwd)","$(POCO_BASE)")}') inproj = $(shell echo | awk '{print index("$(cwd)","$(PROJECT_BASE)")}') -ifeq ($(inpoco),1) +ifneq ($(inpoco),0) PROJECT_BASE = $(POCO_BASE) else -ifeq ($(inproj),1) +ifneq ($(inproj),0) else $(error Current working directory not under $$PROJECT_BASE) endif