mirror of
https://github.com/FeralInteractive/gamemode.git
synced 2025-08-13 08:29:23 +02:00
common: add pidfd related methods
Add functions to open pidfds, i.e. file descriptors representing processes, for process ids and vice versa. Both functions work an array of fds/pids, stop on error and return the number of successfully handled items.
This commit is contained in:
@@ -128,9 +128,13 @@ with_examples = get_option('with-examples')
|
||||
with_util = get_option('with-util')
|
||||
|
||||
# Provide a config.h
|
||||
pidfd_open = cc.has_function('pidfd_open', args: '-D_GNU_SOURCE')
|
||||
|
||||
cdata = configuration_data()
|
||||
cdata.set_quoted('LIBEXECDIR', path_libexecdir)
|
||||
cdata.set_quoted('GAMEMODE_VERSION', meson.project_version())
|
||||
cdata.set10('HAVE_FN_PIDFD_OPEN', pidfd_open)
|
||||
|
||||
config_h = configure_file(
|
||||
configuration: cdata,
|
||||
output: 'build-config.h',
|
||||
|
Reference in New Issue
Block a user