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

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