swr/rast: Fix macOS macro.
authorVinson Lee <vlee@freedesktop.org>
Sat, 24 Feb 2018 23:49:32 +0000 (15:49 -0800)
committerVinson Lee <vlee@freedesktop.org>
Sun, 4 Mar 2018 21:23:57 +0000 (13:23 -0800)
Fixes: a25093de7188 ("swr/rast: Implement JIT shader caching to disk")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-By: George Kyriazis <george.kyriazis@intel.com>
src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp

index ab7c6eb15b09256952d86398c8d03c53ab9ce110..0cefa43529fc1b479789f5f971635dd30b01ffd9 100644 (file)
@@ -47,7 +47,7 @@
 #define JITTER_OUTPUT_DIR SWR_OUTPUT_DIR "\\Jitter"
 #endif // _WIN32
 
-#if defined(__APPLE) || defined(FORCE_LINUX) || defined(__linux__) || defined(__gnu_linux__)
+#if defined(__APPLE__) || defined(FORCE_LINUX) || defined(__linux__) || defined(__gnu_linux__)
 #include <pwd.h>
 #include <sys/stat.h>
 #endif
@@ -532,7 +532,7 @@ static inline uint32_t ComputeModuleCRC(const llvm::Module* M)
 /// constructor
 JitCache::JitCache()
 {
-#if defined(__APPLE) || defined(FORCE_LINUX) || defined(__linux__) || defined(__gnu_linux__)
+#if defined(__APPLE__) || defined(FORCE_LINUX) || defined(__linux__) || defined(__gnu_linux__)
     if (strncmp(KNOB_JIT_CACHE_DIR.c_str(), "~/", 2) == 0) {
         char *homedir;
         if (!(homedir = getenv("HOME"))) {