--- /dev/null
+commit b83292413d860dec09ff14bf329e47a67ba30466
+Author: Hongli Lai <hongli@phusion.nl>
+Date: Fri Nov 12 11:39:44 2010 +0100
+
+ Apparently we can't always rely on 'struct dirent'->d_type for checking whether a directory entry is a directory, so fallback to normal stat() check in case it fails.
+
+diff --git a/ext/common/ServerInstanceDir.h b/ext/common/ServerInstanceDir.h
+index b21f68c..64a17a8 100644
+--- a/ext/common/ServerInstanceDir.h
++++ b/ext/common/ServerInstanceDir.h
+@@ -221,14 +221,18 @@ private:
+ }
+
+ bool isDirectory(const string &dir, struct dirent *entry) const {
+- #ifdef __sun__
+- string path = dir;
+- path.append("/");
+- path.append(entry->d_name);
+- return getFileType(path) == FT_DIRECTORY;
+- #else
+- return entry->d_type == DT_DIR;
++ #ifdef DT_DIR
++ if (entry->d_type == DT_DIR) {
++ return true;
++ } else if (entry->d_type != DT_UNKNOWN) {
++ return false;
++ }
++ // If DT_UNKNOWN, use normal check.
+ #endif
++ string path = dir;
++ path.append("/");
++ path.append(entry->d_name);
++ return getFileType(path) == FT_DIRECTORY;
+ }
+
+ public:
Summary: A module to bridge Ruby on Rails to Apache
Name: apache-mod_rails
Version: 3.0.0
-Release: 1
+Release: 1.1
License: Apache
Group: Networking/Daemons/HTTP
Source0: http://rubygems.org/downloads/passenger-%{version}.gem
# Source0-md5: 1135431e5e655fb1e1173757827b0d9d
Source1: %{name}.conf
-Patch1: %{name}-nogems.patch
+Patch0: %{name}-nogems.patch
+Patch1: %{name}-graceful.patch
URL: http://www.modrails.com
BuildRequires: apache-base >= 2.0.55-1
BuildRequires: apache-devel >= 2.0.55-1
%setup -q -c
%{__tar} xf %{SOURCE0} -O data.tar.gz | %{__tar} xz
find -newer README -o -print | xargs touch --reference %{SOURCE0}
+%patch0 -p1
%patch1 -p1
# TODO : ugly method - but works