[compiler-rt] r369534 - compiler-rt: Fix warning if COMPILER_RT_HAS_FCNTL_LCK is 0

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 21 08:24:25 PDT 2019


Author: nico
Date: Wed Aug 21 08:24:25 2019
New Revision: 369534

URL: http://llvm.org/viewvc/llvm-project?rev=369534&view=rev
Log:
compiler-rt: Fix warning if COMPILER_RT_HAS_FCNTL_LCK is 0

Fixes "warning: implicit declaration of function 'flock' is invalid in C99"
for flock().

Modified:
    compiler-rt/trunk/lib/profile/InstrProfilingUtil.c

Modified: compiler-rt/trunk/lib/profile/InstrProfilingUtil.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfilingUtil.c?rev=369534&r1=369533&r2=369534&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/InstrProfilingUtil.c (original)
+++ compiler-rt/trunk/lib/profile/InstrProfilingUtil.c Wed Aug 21 08:24:25 2019
@@ -12,6 +12,7 @@
 #include <windows.h>
 #include "WindowsMMap.h"
 #else
+#include <sys/file.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>




More information about the llvm-commits mailing list