Blame SOURCES/gdb-attach-fail-reasons-5of5configure.patch

01917d
Index: gdb-7.5.91.20130323/gdb/config.in
01917d
===================================================================
01917d
--- gdb-7.5.91.20130323.orig/gdb/config.in	2013-03-23 19:48:18.000000000 +0100
01917d
+++ gdb-7.5.91.20130323/gdb/config.in	2013-03-23 19:50:53.300066378 +0100
01917d
@@ -216,6 +216,9 @@
01917d
 /* Define if librpm library is being used. */
01917d
 #undef HAVE_LIBRPM
01917d
 
01917d
+/* Define to 1 if you have the `selinux' library (-lselinux). */
01917d
+#undef HAVE_LIBSELINUX
01917d
+
01917d
 /* Define to 1 if you have the <libunwind-ia64.h> header file. */
01917d
 #undef HAVE_LIBUNWIND_IA64_H
01917d
 
01917d
@@ -360,6 +363,9 @@
01917d
 /* Define to 1 if you have the `sbrk' function. */
01917d
 #undef HAVE_SBRK
01917d
 
01917d
+/* Define to 1 if you have the <selinux/selinux.h> header file. */
01917d
+#undef HAVE_SELINUX_SELINUX_H
01917d
+
01917d
 /* Define to 1 if you have the `setlocale' function. */
01917d
 #undef HAVE_SETLOCALE
01917d
 
01917d
Index: gdb-7.5.91.20130323/gdb/configure
01917d
===================================================================
01917d
--- gdb-7.5.91.20130323.orig/gdb/configure	2013-03-23 19:48:18.000000000 +0100
01917d
+++ gdb-7.5.91.20130323/gdb/configure	2013-03-23 19:50:53.303066376 +0100
01917d
@@ -12814,6 +12814,64 @@ $as_echo "#define HAVE_PERSONALITY 1" >>
01917d
 
01917d
 fi
01917d
 
01917d
+for ac_header in selinux/selinux.h
01917d
+do :
01917d
+  ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
01917d
+if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then :
01917d
+  cat >>confdefs.h <<_ACEOF
01917d
+#define HAVE_SELINUX_SELINUX_H 1
01917d
+_ACEOF
01917d
+
01917d
+fi
01917d
+
01917d
+done
01917d
+
01917d
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_get_boolean_active in -lselinux" >&5
01917d
+$as_echo_n "checking for security_get_boolean_active in -lselinux... " >&6; }
01917d
+if test "${ac_cv_lib_selinux_security_get_boolean_active+set}" = set; then :
01917d
+  $as_echo_n "(cached) " >&6
01917d
+else
01917d
+  ac_check_lib_save_LIBS=$LIBS
01917d
+LIBS="-lselinux  $LIBS"
01917d
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
01917d
+/* end confdefs.h.  */
01917d
+
01917d
+/* Override any GCC internal prototype to avoid an error.
01917d
+   Use char because int might match the return type of a GCC
01917d
+   builtin and then its argument prototype would still apply.  */
01917d
+#ifdef __cplusplus
01917d
+extern "C"
01917d
+#endif
01917d
+char security_get_boolean_active ();
01917d
+int
01917d
+main ()
01917d
+{
01917d
+return security_get_boolean_active ();
01917d
+  ;
01917d
+  return 0;
01917d
+}
01917d
+_ACEOF
01917d
+if ac_fn_c_try_link "$LINENO"; then :
01917d
+  ac_cv_lib_selinux_security_get_boolean_active=yes
01917d
+else
01917d
+  ac_cv_lib_selinux_security_get_boolean_active=no
01917d
+fi
01917d
+rm -f core conftest.err conftest.$ac_objext \
01917d
+    conftest$ac_exeext conftest.$ac_ext
01917d
+LIBS=$ac_check_lib_save_LIBS
01917d
+fi
01917d
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_get_boolean_active" >&5
01917d
+$as_echo "$ac_cv_lib_selinux_security_get_boolean_active" >&6; }
01917d
+if test "x$ac_cv_lib_selinux_security_get_boolean_active" = x""yes; then :
01917d
+  cat >>confdefs.h <<_ACEOF
01917d
+#define HAVE_LIBSELINUX 1
01917d
+_ACEOF
01917d
+
01917d
+  LIBS="-lselinux $LIBS"
01917d
+
01917d
+fi
01917d
+
01917d
+
01917d
 
01917d
 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
01917d
 # except that the argument to --with-sysroot is optional.
01917d
Index: gdb-7.5.91.20130323/gdb/gdbserver/config.in
01917d
===================================================================
01917d
--- gdb-7.5.91.20130323.orig/gdb/gdbserver/config.in	2013-03-11 09:35:09.000000000 +0100
01917d
+++ gdb-7.5.91.20130323/gdb/gdbserver/config.in	2013-03-23 19:51:14.323052419 +0100
01917d
@@ -73,6 +73,9 @@
01917d
 /* Define to 1 if you have the `dl' library (-ldl). */
01917d
 #undef HAVE_LIBDL
01917d
 
01917d
+/* Define to 1 if you have the `selinux' library (-lselinux). */
01917d
+#undef HAVE_LIBSELINUX
01917d
+
01917d
 /* Define if the target supports branch tracing. */
01917d
 #undef HAVE_LINUX_BTRACE
01917d
 
01917d
@@ -140,6 +143,9 @@
01917d
 /* Define to 1 if you have the `readlink' function. */
01917d
 #undef HAVE_READLINK
01917d
 
01917d
+/* Define to 1 if you have the <selinux/selinux.h> header file. */
01917d
+#undef HAVE_SELINUX_SELINUX_H
01917d
+
01917d
 /* Define to 1 if you have the <sgtty.h> header file. */
01917d
 #undef HAVE_SGTTY_H
01917d
 
01917d
Index: gdb-7.5.91.20130323/gdb/gdbserver/configure
01917d
===================================================================
01917d
--- gdb-7.5.91.20130323.orig/gdb/gdbserver/configure	2013-03-11 09:35:09.000000000 +0100
01917d
+++ gdb-7.5.91.20130323/gdb/gdbserver/configure	2013-03-23 19:50:53.305066374 +0100
01917d
@@ -5911,6 +5911,64 @@ if $want_ipa ; then
01917d
    fi
01917d
 fi
01917d
 
01917d
+for ac_header in selinux/selinux.h
01917d
+do :
01917d
+  ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
01917d
+if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then :
01917d
+  cat >>confdefs.h <<_ACEOF
01917d
+#define HAVE_SELINUX_SELINUX_H 1
01917d
+_ACEOF
01917d
+
01917d
+fi
01917d
+
01917d
+done
01917d
+
01917d
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_get_boolean_active in -lselinux" >&5
01917d
+$as_echo_n "checking for security_get_boolean_active in -lselinux... " >&6; }
01917d
+if test "${ac_cv_lib_selinux_security_get_boolean_active+set}" = set; then :
01917d
+  $as_echo_n "(cached) " >&6
01917d
+else
01917d
+  ac_check_lib_save_LIBS=$LIBS
01917d
+LIBS="-lselinux  $LIBS"
01917d
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
01917d
+/* end confdefs.h.  */
01917d
+
01917d
+/* Override any GCC internal prototype to avoid an error.
01917d
+   Use char because int might match the return type of a GCC
01917d
+   builtin and then its argument prototype would still apply.  */
01917d
+#ifdef __cplusplus
01917d
+extern "C"
01917d
+#endif
01917d
+char security_get_boolean_active ();
01917d
+int
01917d
+main ()
01917d
+{
01917d
+return security_get_boolean_active ();
01917d
+  ;
01917d
+  return 0;
01917d
+}
01917d
+_ACEOF
01917d
+if ac_fn_c_try_link "$LINENO"; then :
01917d
+  ac_cv_lib_selinux_security_get_boolean_active=yes
01917d
+else
01917d
+  ac_cv_lib_selinux_security_get_boolean_active=no
01917d
+fi
01917d
+rm -f core conftest.err conftest.$ac_objext \
01917d
+    conftest$ac_exeext conftest.$ac_ext
01917d
+LIBS=$ac_check_lib_save_LIBS
01917d
+fi
01917d
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_get_boolean_active" >&5
01917d
+$as_echo "$ac_cv_lib_selinux_security_get_boolean_active" >&6; }
01917d
+if test "x$ac_cv_lib_selinux_security_get_boolean_active" = x""yes; then :
01917d
+  cat >>confdefs.h <<_ACEOF
01917d
+#define HAVE_LIBSELINUX 1
01917d
+_ACEOF
01917d
+
01917d
+  LIBS="-lselinux $LIBS"
01917d
+
01917d
+fi
01917d
+
01917d
+
01917d
 
01917d
 
01917d