Don't run personality syscall at configure time; don't check it at all
[deliverable/binutils-gdb.git] / gdb / nat / linux-personality.c
index 87d1921862602fe1d7230369ff8e9a3c7991ddcc..9ce345bc6de2a8c4a8fff4e1615f773bc8c51cad 100644 (file)
 #include "gdbsupport/common-defs.h"
 #include "nat/linux-personality.h"
 
-#ifdef HAVE_PERSONALITY
-# include <sys/personality.h>
-# if !HAVE_DECL_ADDR_NO_RANDOMIZE
-#  define ADDR_NO_RANDOMIZE 0x0040000
-# endif /* ! HAVE_DECL_ADDR_NO_RANDOMIZE */
-#endif /* HAVE_PERSONALITY */
+#include <sys/personality.h>
 
 /* See comment on nat/linux-personality.h.  */
 
@@ -34,7 +29,6 @@ maybe_disable_address_space_randomization (int disable_randomization)
   : m_personality_set (false),
     m_personality_orig (0)
 {
-#ifdef HAVE_PERSONALITY
   if (disable_randomization)
     {
       errno = 0;
@@ -49,14 +43,11 @@ maybe_disable_address_space_randomization (int disable_randomization)
        warning (_("Error disabling address space randomization: %s"),
                 safe_strerror (errno));
     }
-#endif /* HAVE_PERSONALITY */
 }
 
 maybe_disable_address_space_randomization::
 ~maybe_disable_address_space_randomization ()
 {
-#ifdef HAVE_PERSONALITY
-
   if (m_personality_set)
     {
       errno = 0;
@@ -65,5 +56,4 @@ maybe_disable_address_space_randomization::
        warning (_("Error restoring address space randomization: %s"),
                 safe_strerror (errno));
     }
-#endif /* HAVE_PERSONALITY */
 }
This page took 0.303976 seconds and 4 git commands to generate.