From 8a7669993ede67715812371a5cbb29d6c5eb24be Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Tue, 28 Mar 2017 11:21:24 -0700 Subject: [PATCH] Implement S_ISDIR() Summary: It's needed downstream in HHVM. Reviewed By: yfeldblum Differential Revision: D4785204 fbshipit-source-id: fe81ed8e23497fffeb44b2a366c457b788bcaada --- folly/portability/SysStat.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/folly/portability/SysStat.h b/folly/portability/SysStat.h index 0901f9ae..89acc45c 100755 --- a/folly/portability/SysStat.h +++ b/folly/portability/SysStat.h @@ -35,6 +35,8 @@ #define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) #define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) +#define S_ISDIR(mode) (((mode) & _S_IFDIR) == _S_IFDIR ? 1 : 0) + // This isn't defined anywhere, so give a sane value. #define MAXSYMLINKS 255 -- 2.34.1