#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. */
: m_personality_set (false),
m_personality_orig (0)
{
-#ifdef HAVE_PERSONALITY
if (disable_randomization)
{
errno = 0;
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;
warning (_("Error restoring address space randomization: %s"),
safe_strerror (errno));
}
-#endif /* HAVE_PERSONALITY */
}