diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2021-04-16 12:07:54 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2021-04-16 12:07:54 +0100 |
commit | b2588eed03640dc74ffdbebd10c719064b575291 (patch) | |
tree | 38845106f5cca6093b89fa78c43a664a526f298a | |
parent | 9af78c8e694dd3c05859c228856621a5a746de58 (diff) | |
download | rtmux-b2588eed03640dc74ffdbebd10c719064b575291.tar.gz rtmux-b2588eed03640dc74ffdbebd10c719064b575291.tar.bz2 rtmux-b2588eed03640dc74ffdbebd10c719064b575291.zip |
Apple have broken strtonum so check it works, from Teubel Gyorgy.
-rw-r--r-- | configure.ac | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 4175f5c8..b2a13c5e 100644 --- a/configure.ac +++ b/configure.ac @@ -150,10 +150,19 @@ AC_REPLACE_FUNCS([ \ strlcpy \ strndup \ strsep \ - strtonum \ ]) AC_FUNC_STRNLEN +# Check if strtonum works. +AC_MSG_CHECKING([for working strtonum]) +AC_RUN_IFELSE([AC_LANG_PROGRAM( + [#include <stdlib.h>], + [return (strtonum("0", 0, 1, NULL) == 0 ? 0 : 1);] + )], + [AC_DEFINE(HAVE_STRTONUM) AC_MSG_RESULT(yes)], + [AC_LIBOBJ(strtonum) AC_MSG_RESULT(no)] +) + # Clang sanitizers wrap reallocarray even if it isn't available on the target # system. When compiled it always returns NULL and crashes the program. To # detect this we need a more complicated test. |