aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-11-10 21:42:57 +0000
committerMike Frysinger <vapier@gentoo.org>2008-11-10 21:42:57 +0000
commit2f65b0e4a6fa228869f0ca5b77cc840f9b3280ae (patch)
tree6c6dde3f80c2b8bad1d8496839e06f538f7d1de0
parentlibsandbox: detect static ELFs and warn when we try to execute them (diff)
downloadsandbox-2f65b0e4a6fa228869f0ca5b77cc840f9b3280ae.tar.gz
sandbox-2f65b0e4a6fa228869f0ca5b77cc840f9b3280ae.tar.bz2
sandbox-2f65b0e4a6fa228869f0ca5b77cc840f9b3280ae.zip
check for backtrace and stdbool.h/elf.h/execinfo.h
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r--configure.ac29
-rw-r--r--headers.h9
2 files changed, 33 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index ecbbdc3..f142cb7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,13 +31,16 @@ AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS_ONCE([ \
dirent.h \
dlfcn.h \
+ elf.h \
errno.h \
+ execinfo.h \
fcntl.h \
libgen.h \
limits.h \
memory.h \
signal.h \
stdarg.h \
+ stdbool.h \
stddef.h \
stdio.h \
stdlib.h \
@@ -68,11 +71,27 @@ AC_FUNC_LSTAT
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
AC_TYPE_SIGNAL
AC_FUNC_STAT
-AC_CHECK_FUNCS([ \
- bzero ftruncate getcwd lchown memmove \
- memcpy memset mkdir pathconf realpath \
- rmdir setenv strcasecmp strchr strdup \
- strerror strndup strrchr strspn strstr \
+AC_CHECK_FUNCS_ONCE([ \
+ backtrace \
+ ftruncate \
+ getcwd \
+ lchown \
+ memmove \
+ memcpy \
+ memset \
+ mkdir \
+ pathconf \
+ realpath \
+ rmdir \
+ setenv \
+ strcasecmp \
+ strchr \
+ strdup \
+ strerror \
+ strndup \
+ strrchr \
+ strspn \
+ strstr \
strtok_r \
])
dnl For librcutil
diff --git a/headers.h b/headers.h
index 237de25..9e2f15a 100644
--- a/headers.h
+++ b/headers.h
@@ -15,9 +15,15 @@
#ifdef HAVE_DLFCN_H
# include <dlfcn.h>
#endif
+#ifdef HAVE_ELF_H
+# include <elf.h>
+#endif
#ifdef HAVE_ERRNO_H
# include <errno.h>
#endif
+#ifdef HAVE_EXECINFO_H
+# include <execinfo.h>
+#endif
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif
@@ -36,6 +42,9 @@
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
+#ifdef HAVE_STDBOOL_H
+# include <stdbool.h>
+#endif
#ifdef HAVE_STDDEF_H
# include <stddef.h>
#endif