Skip to content

Commit 1ca77f3

Browse files
committed
fixup! aio: Add asynchronous IO infrastructure.
1 parent e83d5c6 commit 1ca77f3

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

.cirrus.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ task:
219219
meson setup \
220220
--buildtype=debug \
221221
-Dcassert=true -Dssl=openssl -Duuid=bsd -Dtcl_version=tcl86 -Ddtrace=auto \
222-
-Dposix_aio=true \
222+
-Dposix_aio=enabled \
223223
-DPG_TEST_EXTRA="$PG_TEST_EXTRA" \
224224
-Dextra_lib_dirs=/usr/local/lib -Dextra_include_dirs=/usr/local/include/ \
225225
build
@@ -370,7 +370,7 @@ task:
370370
--buildtype=debug \
371371
-Dcassert=true \
372372
${LINUX_MESON_FEATURES} \
373-
-Dposix_aio=true \
373+
-Dposix_aio=enabled \
374374
-DPG_TEST_EXTRA="$PG_TEST_EXTRA" \
375375
build
376376
EOF
@@ -546,7 +546,7 @@ task:
546546
-Dextra_lib_dirs=${brewpath}/lib \
547547
-Dcassert=true \
548548
-Dssl=openssl -Duuid=e2fs -Ddtrace=auto \
549-
-Dposix_aio=true \
549+
-Dposix_aio=enabled \
550550
-DPG_TEST_EXTRA="$PG_TEST_EXTRA" \
551551
build
552552

meson.build

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -818,14 +818,16 @@ endif
818818
###############################################################
819819

820820
posix_aio_opt = get_option('posix_aio')
821-
posix_aio = cc.find_library('rt',
822-
has_headers: 'aio.h',
823-
header_include_directories: postgres_inc,
824-
dirs: test_lib_d,
825-
required: posix_aio_opt)
821+
posix_aio = not_found_dep
822+
if not posix_aio_opt.disabled()
823+
rt_dep = cc.find_library('rt', required: false)
826824

827-
if posix_aio.found()
828-
cdata.set('USE_POSIX_AIO', 1)
825+
if cc.has_header_symbol('aio.h', 'aio_read',
826+
required: posix_aio_opt,
827+
args: test_c_args, include_directories: postgres_inc)
828+
posix_aio = declare_dependency()
829+
cdata.set('USE_POSIX_AIO', 1)
830+
endif
829831
endif
830832

831833

0 commit comments

Comments
 (0)