Fix compilation on OpenBSD

Fixes #2935
This commit is contained in:
Kovid Goyal
2020-08-24 12:05:39 +05:30
parent f65914599b
commit 11942ed6dc
2 changed files with 7 additions and 3 deletions

View File

@@ -10,6 +10,7 @@ from typing import Callable, Dict, List, Optional, Tuple
_plat = sys.platform.lower()
is_linux = 'linux' in _plat
is_openbsd = 'openbsd' in _plat
base = os.path.dirname(os.path.abspath(__file__))
@@ -73,7 +74,9 @@ def init_env(env: Env, pkg_config: Callable, at_least_version: Callable, test_co
if module in ('x11', 'wayland'):
ans.cflags.append('-pthread')
ans.ldpaths.append('-pthread')
ans.ldpaths.extend('-lrt -lm -ldl'.split())
ans.ldpaths.append('-lm')
if not is_openbsd:
ans.ldpaths.extend('-lrt -ldl'.split())
at_least_version('xkbcommon', 0, 5)
if module == 'x11':