Skip to content

Commit

Permalink
Revert "build(meson): automatically use poll or select as needed (yhi…
Browse files Browse the repository at this point in the history
…rose#2067)"

This reverts commit 2b5d1ee.
  • Loading branch information
falbrechtskirchinger committed Feb 20, 2025
1 parent de43d59 commit b641cd9
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,17 @@ project(
meson_version: '>=0.62.0'
)

cxx = meson.get_compiler('cpp')

# Check just in case downstream decides to edit the source
# and add a project version
version = meson.project_version()
if version == 'undefined'
cxx = meson.get_compiler('cpp')
version = cxx.get_define('CPPHTTPLIB_VERSION',
prefix: '#include <httplib.h>',
include_directories: include_directories('.')).strip('"')
assert(version != '', 'failed to get version from httplib.h')
endif

if cxx.has_function('poll', prefix: '#include <poll.h>')
# Use poll if present
add_project_arguments('-DCPPHTTPLIB_USE_POLL', language: 'cpp')
else if cxx.has_function('select', prefix: '#include <sys/select.h>')
# Use select otherwise
add_project_arguments('-DCPPHTTPLIB_USE_SELECT', language: 'cpp')
endif

deps = [dependency('threads')]
args = []

Expand Down

0 comments on commit b641cd9

Please sign in to comment.