Skip to content

Commit

Permalink
meson.build: adapt to alloca removal
Browse files Browse the repository at this point in the history
  • Loading branch information
eli-schwartz committed Feb 5, 2024
1 parent 3465a3d commit 35db48d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 0 additions & 5 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,7 @@ config.set('WITH_LIBIDN', enable_runtime == 'libidn')
config.set('ENABLE_BUILTIN', enable_builtin)
config.set('HAVE_UNISTD_H', cc.check_header('unistd.h'))
config.set('HAVE_STDINT_H', cc.check_header('stdint.h'))
config.set('HAVE_ALLOCA_H', cc.check_header('alloca.h'))
config.set('HAVE_DIRENT_H', cc.check_header('dirent.h'))
config.set('HAVE_ALLOCA', cc.has_function('alloca'))
config.set('HAVE_STRNDUP', cc.has_function('strndup'))
config.set('HAVE_CLOCK_GETTIME', cc.has_function('clock_gettime'))
config.set('HAVE_FMEMOPEN', cc.has_function('fmemopen'))
Expand Down Expand Up @@ -127,9 +125,6 @@ if cc.get_id() == 'msvc'
add_project_arguments('-Dsnprintf=_snprintf', language: 'c')
endif
endif
if cc.has_header_symbol('malloc.h', '_alloca')
add_project_arguments('-Dalloca=_alloca', language: 'c')
endif
endif

subdir('include')
Expand Down
5 changes: 4 additions & 1 deletion tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,15 @@ if enable_builtin
tests += ['test-is-public-builtin', 'test-registrable-domain']
endif

libtestcommon = static_library('testcommon', 'common.c',
build_by_default: false)

foreach test_name : tests
sources = [test_name + '.c', 'common.c', 'common.h']
exe = executable(test_name, sources,
build_by_default: false,
c_args : tests_cargs,
link_with : libpsl,
link_with : [libpsl, libtestcommon],
include_directories : configinc,
link_language : link_language,
dependencies : [libpsl_dep, networking_deps])
Expand Down

0 comments on commit 35db48d

Please sign in to comment.