[flang-commits] [flang] 0cee894 - [flang][NFC] Add missing include for FreeBSD

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Wed Apr 17 13:20:49 PDT 2024


Author: Tom Eccles
Date: 2024-04-17T20:17:02Z
New Revision: 0cee89431d77d0bb0809fd9b2c9d21da2a2783aa

URL: https://github.com/llvm/llvm-project/commit/0cee89431d77d0bb0809fd9b2c9d21da2a2783aa
DIFF: https://github.com/llvm/llvm-project/commit/0cee89431d77d0bb0809fd9b2c9d21da2a2783aa.diff

LOG: [flang][NFC] Add missing include for FreeBSD

Suggested by dankm here: https://github.com/llvm/llvm-project/pull/88517

Added: 
    

Modified: 
    flang/runtime/extensions.cpp

Removed: 
    


################################################################################
diff  --git a/flang/runtime/extensions.cpp b/flang/runtime/extensions.cpp
index 12498b502ae1cf..4b110cc10c840e 100644
--- a/flang/runtime/extensions.cpp
+++ b/flang/runtime/extensions.cpp
@@ -43,9 +43,9 @@ inline void CtimeBuffer(char *buffer, size_t bufsize, const time_t cur_time,
 }
 #endif
 
-#if _REENTRANT || _POSIX_C_SOURCE >= 199506L
-// System is posix-compliant and has getlogin_r
-#include <unistd.h>
+#ifndef _WIN32
+// posix-compliant and has getlogin_r and F_OK
+#include <unistd.h> 
 #endif
 
 extern "C" {


        


More information about the flang-commits mailing list