[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libunwind-devel] [PATCH 1/4] Check for <sys/ptrace.h> before including
From: |
Joel Brobecker |
Subject: |
[Libunwind-devel] [PATCH 1/4] Check for <sys/ptrace.h> before including it |
Date: |
Wed, 15 Jun 2011 20:07:07 -0400 |
On ia64-hpux version 11.31, <sys/ptrace.h> has been removed.
This patch adds a configure check for this header file, and only
includes <sys/ptrace.h> if it exists.
---
configure.in | 2 +-
src/ptrace/_UPT_internal.h | 2 ++
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/configure.in b/configure.in
index 58c0ff9..724b124 100644
--- a/configure.in
+++ b/configure.in
@@ -37,7 +37,7 @@ dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(asm/ptrace_offsets.h endian.h sys/endian.h execinfo.h \
ia64intrin.h sys/uc_access.h unistd.h signal.h sys/types.h \
- sys/procfs.h)
+ sys/procfs.h sys/ptrace.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
diff --git a/src/ptrace/_UPT_internal.h b/src/ptrace/_UPT_internal.h
index ff11e73..bfc26b0 100644
--- a/src/ptrace/_UPT_internal.h
+++ b/src/ptrace/_UPT_internal.h
@@ -33,7 +33,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
+#ifdef HAVE_SYS_PTRACE_H
#include <sys/ptrace.h>
+#endif
#ifdef HAVE_SYS_PROCFS_H
#include <sys/procfs.h>
#endif
--
1.7.0.4