diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-05 19:02:25 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-05 19:02:25 +0000 |
commit | edc5a3c48ee8425570aea15d1833062b78aafae0 (patch) | |
tree | da1b259d79d90b13835c6dfa196048c3afa384b4 /base/platform_file_posix.cc | |
parent | c9d8d1838b2e669c9687b00f9642c3d350032362 (diff) | |
download | chromium_src-edc5a3c48ee8425570aea15d1833062b78aafae0.zip chromium_src-edc5a3c48ee8425570aea15d1833062b78aafae0.tar.gz chromium_src-edc5a3c48ee8425570aea15d1833062b78aafae0.tar.bz2 |
openbsd: make platform_file_posix compile
- switch errno from ENOTSUP to EOPNOTSUPP: Linux doesn't have ENOTSUP and errno.h just does 'define ENOTSUP EOPNOTSUPP', on BSD the alias is not available at all (despite POSIX specifying it)
- pull in <sys/stat.h> for S_IRUSR defines
Review URL: http://codereview.chromium.org/118295
Patch from Peter Valchev <pvalchev@google.com>.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17749 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/platform_file_posix.cc')
-rw-r--r-- | base/platform_file_posix.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/base/platform_file_posix.cc b/base/platform_file_posix.cc index b4b7862..dd1c78d 100644 --- a/base/platform_file_posix.cc +++ b/base/platform_file_posix.cc @@ -6,6 +6,7 @@ #include <fcntl.h> #include <errno.h> +#include <sys/stat.h> #include "base/logging.h" #include "base/string_util.h" @@ -28,7 +29,7 @@ PlatformFile CreatePlatformFile(const std::wstring& name, if (!open_flags && !(flags & PLATFORM_FILE_OPEN) && !(flags & PLATFORM_FILE_OPEN_ALWAYS)) { NOTREACHED(); - errno = ENOTSUP; + errno = EOPNOTSUPP; return kInvalidPlatformFileValue; } |