summaryrefslogtreecommitdiff
path: root/compiler-rt/lib/profile/InstrProfilingFile.c
diff options
context:
space:
mode:
authorFlorian Mayer <fmayer@google.com>2025-10-22 10:55:10 -0700
committerFlorian Mayer <fmayer@google.com>2025-10-22 10:55:10 -0700
commitf5f8398d7fe18a968f5873518e87d5fdd8269359 (patch)
tree347dff286c3b48b2336fb7a425adfceebd478116 /compiler-rt/lib/profile/InstrProfilingFile.c
parent73edaec4a6cd1212f9ae819c413d2cf58216d3b1 (diff)
parenta0abc0af0a0a90878822f8107d70dad6f7cdfc26 (diff)
Created using spr 1.3.7
Diffstat (limited to 'compiler-rt/lib/profile/InstrProfilingFile.c')
-rw-r--r--compiler-rt/lib/profile/InstrProfilingFile.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler-rt/lib/profile/InstrProfilingFile.c b/compiler-rt/lib/profile/InstrProfilingFile.c
index 354f21b78615..71127b05aafb 100644
--- a/compiler-rt/lib/profile/InstrProfilingFile.c
+++ b/compiler-rt/lib/profile/InstrProfilingFile.c
@@ -8,6 +8,11 @@
#if !defined(__Fuchsia__)
+#if defined(__linux__)
+// For fileno(), ftruncate(), getpagesize(), setenv()
+#define _DEFAULT_SOURCE
+#endif
+
#include <assert.h>
#include <errno.h>
#include <stdio.h>