aboutsummaryrefslogtreecommitdiff
path: root/gdb/nat/linux-personality.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/nat/linux-personality.c')
-rw-r--r--gdb/nat/linux-personality.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/gdb/nat/linux-personality.c b/gdb/nat/linux-personality.c
index 87d1921..9ce345b 100644
--- a/gdb/nat/linux-personality.c
+++ b/gdb/nat/linux-personality.c
@@ -20,12 +20,7 @@
#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 */
}