diff options
author | Dmitry V. Levin <ldv@strace.io> | 2021-04-27 22:00:00 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2021-04-27 22:00:00 +0000 |
commit | f51d1db24c01590d405f92a83b2c6282f6e2b8e5 (patch) | |
tree | 04d1fcafb9a34af554ac2f10b0a04e97c9cd55e4 | |
parent | 7f2bbdaca5dd134e425cb40219d8826a03c31e73 (diff) | |
download | strace-f51d1db24c01590d405f92a83b2c6282f6e2b8e5.tar.gz |
mpers.m4: extend compilation checks
Before this change, configure --enable-mpers=check failed to detect
the OS misconfiguration that manifested itself as "#include <errno.h>
doesn't work".
* m4/mpers.m4 (st_MPERS): Include <errno.h> along with <stdint.h>
in compilation checks.
Reported-by: Deborah Brouwer <3563deb6753@gmail.com>
Link: https://lists.strace.io/pipermail/strace-devel/2021-March/010449.html
Resolves: https://github.com/strace/strace/issues/183
-rw-r--r-- | m4/mpers.m4 | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/m4/mpers.m4 b/m4/mpers.m4 index 0d4b95ca4..4a1244a0e 100644 --- a/m4/mpers.m4 +++ b/m4/mpers.m4 @@ -107,14 +107,16 @@ case "$arch" in CFLAGS="$CFLAGS MPERS_CFLAGS" AC_CACHE_CHECK([for mpers_name personality compile support (using $CC $CPPFLAGS $CFLAGS)], [st_cv_cc], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>]], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h> +#include <errno.h>]], [[return 0]])], [st_cv_cc=yes], [st_cv_cc=no])]) if test $st_cv_cc = yes; then AC_CACHE_CHECK([for mpers_name personality runtime support], [st_cv_runtime], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>]], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h> +#include <errno.h>]], [[return 0]])], [st_cv_runtime=yes], [st_cv_runtime=no], |