aboutsummaryrefslogtreecommitdiffstats
path: root/testing/kitty/clock-gettime-musl-fix.patch
blob: d8329b75674bafdfd36eed49428ff13f4ee0bfd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 4a5e48d848b219e4451a7f2a971c1f8e846a9bb6 Mon Sep 17 00:00:00 2001
From: Kovid Goyal <kovid@kovidgoyal.net>
Date: Wed, 27 Nov 2019 22:19:12 +0530
Subject: [PATCH] Better fix for getting clock_gettime() from time.h

Fixes #2169
---
 setup.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/setup.py b/setup.py
index e3109bfc0..45f12183a 100755
--- a/setup.py
+++ b/setup.py
@@ -213,13 +213,12 @@ def init_env(
     for el in extra_logging:
         cppflags.append('-DDEBUG_{}'.format(el.upper().replace('-', '_')))
     # gnu11 is needed to get monotonic.h to build on older Linux distros
-    std = 'c' if is_macos or ccver[0] >= 5 else 'gnu'
     cflags = os.environ.get(
         'OVERRIDE_CFLAGS', (
-            '-Wextra {} -Wno-missing-field-initializers -Wall -Wstrict-prototypes -std={}11'
+            '-Wextra {} -Wno-missing-field-initializers -Wall -Wstrict-prototypes -D_POSIX_C_SOURCE=200809L -std=c11'
             ' -pedantic-errors -Werror {} {} -fwrapv {} {} -pipe {} -fvisibility=hidden'
         ).format(
-            float_conversion, std,
+            float_conversion,
             optimize,
             ' '.join(sanitize_args),
             stack_protector,