mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
meson: link with -lrt if needed for clock_gettime
This is already done in autotools, and fixes the build with glibc < 2.17. Signed-off-by: Loïc Yhuel <loic.yhuel@softathome.com>
This commit is contained in:
parent
ea09c2fde7
commit
74182eb605
3 changed files with 12 additions and 3 deletions
|
|
@ -56,6 +56,14 @@ if get_option('libraries')
|
|||
error('@0@ is needed to compile Wayland libraries'.format(d['symbol']))
|
||||
endif
|
||||
endforeach
|
||||
|
||||
rt_dep = []
|
||||
if not cc.has_function('clock_gettime', prefix: '#include <time.h>')
|
||||
rt_dep = cc.find_library('rt')
|
||||
if not cc.has_function('clock_gettime', prefix: '#include <time.h>', dependencies: rt_dep)
|
||||
error('clock_gettime not found')
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
scanner_deps = [ dependency('expat') ]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue