summaryrefslogtreecommitdiff
path: root/dev-python/pymssql/files/pymssql-2.2.1-clock_gettime.patch
blob: 76d07e27db24c3bcffd2ae485cee4ea29bbbce05 (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
From d130cacf5be53b4c15bb64787d82b1225b1485e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Sat, 17 Apr 2021 13:10:34 +0200
Subject: [PATCH] Check for clock_gettime() only when linking statically

The extension module does not use clock_gettime() directly, so I presume
it is only necessary when linking statically to FreeTDS.
---
 setup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index 3ac434e..0295d01 100644
--- a/setup.py
+++ b/setup.py
@@ -95,7 +95,7 @@ if not WINDOWS:
 print("setup.py: include_dirs =>", include_dirs)
 print("setup.py: library_dirs =>", library_dirs)
 
-if not WINDOWS:
+if LINK_FREETDS_STATICALLY and not WINDOWS:
     # check for clock_gettime, link with librt for glibc<2.17
     from dev import ccompiler
     compiler = ccompiler.new_compiler()
-- 
2.31.1