Commit 504468d2 authored by Jon Turney's avatar Jon Turney Committed by Adam Jackson
Browse files

meson: Don't use strndup() unless it's prototyped

A workaround for

MinGW-w64 gcc has a built-in strndup, but it's not in the C library and
MinGW-w64 headers don't prototype it.

Don't try to use it, as that will cause an undefined reference if gcc
decides that an out-of-line call is appropriate.
parent d3a528c9
Pipeline #34092 passed with stages
in 6 minutes and 46 seconds
......@@ -159,7 +159,7 @@ conf_data.set('HAVE_STRCASESTR', cc.has_function('strcasestr'))
conf_data.set('HAVE_STRLCAT', cc.has_function('strlcat', dependencies: libbsd_dep))
conf_data.set('HAVE_STRLCPY', cc.has_function('strlcpy', dependencies: libbsd_dep))
conf_data.set('HAVE_STRNCASECMP', cc.has_function('strncasecmp'))
conf_data.set('HAVE_STRNDUP', cc.has_function('strndup'))
conf_data.set('HAVE_STRNDUP', cc.has_function('strndup') and cc.has_header_symbol('string.h', 'strndup'))
conf_data.set('HAVE_TIMINGSAFE_MEMCMP', cc.has_function('timingsafe_memcmp'))
conf_data.set('HAVE_VASPRINTF', cc.has_function('vasprintf'))
conf_data.set('HAVE_VSNPRINTF', cc.has_function('vsnprintf'))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment