|
|
05ad79 |
From e08af84191b2a8ca226e1c72c27c63dcf8ac8c27 Mon Sep 17 00:00:00 2001
|
|
|
05ad79 |
From: Sami Kerola <kerolasa@iki.fi>
|
|
|
05ad79 |
Date: Sun, 28 Jul 2013 22:11:16 +0100
|
|
|
05ad79 |
Subject: [PATCH] setarch: prefer preprocessor rather than autotools check
|
|
|
05ad79 |
|
|
|
05ad79 |
It seems to be pointless to spend time in ./configure phase when
|
|
|
05ad79 |
preprocessor has to perform #ifndef check anyway.
|
|
|
05ad79 |
|
|
|
05ad79 |
[kzak@redhat.com: -
|
|
|
05ad79 |
Note that on RHEL-7 glibc' <sys/personality.h> does not contain the
|
|
|
05ad79 |
same set of the flags like <linux/personality.h>. We need to include
|
|
|
05ad79 |
glibc version dues to syscall, so it seems better make our macro
|
|
|
05ad79 |
fallbacks more robust.]
|
|
|
05ad79 |
|
|
|
05ad79 |
Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=1690102
|
|
|
05ad79 |
Upstream: http://github.com/karelzak/util-linux/commit/f29a3d1868c847ae41bc681db58bd087fc9f941d
|
|
|
05ad79 |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
05ad79 |
---
|
|
|
05ad79 |
configure.ac | 12 ------------
|
|
|
05ad79 |
sys-utils/setarch.c | 22 +++++++++++-----------
|
|
|
05ad79 |
2 files changed, 11 insertions(+), 23 deletions(-)
|
|
|
05ad79 |
|
|
|
05ad79 |
diff --git a/configure.ac b/configure.ac
|
|
|
05ad79 |
index 4c5d098e6..49de6c6b3 100644
|
|
|
05ad79 |
--- a/configure.ac
|
|
|
05ad79 |
+++ b/configure.ac
|
|
|
05ad79 |
@@ -260,18 +260,6 @@ AC_CHECK_MEMBERS([struct termios.c_line],,,
|
|
|
05ad79 |
AC_CHECK_MEMBERS([struct stat.st_mtim.tv_nsec],,,
|
|
|
05ad79 |
[#include <sys/stat.h>])
|
|
|
05ad79 |
|
|
|
05ad79 |
-AC_CHECK_DECLS([
|
|
|
05ad79 |
- UNAME26,
|
|
|
05ad79 |
- ADDR_NO_RANDOMIZE,
|
|
|
05ad79 |
- FDPIC_FUNCPTRS,
|
|
|
05ad79 |
- MMAP_PAGE_ZERO,
|
|
|
05ad79 |
- ADDR_COMPAT_LAYOUT,
|
|
|
05ad79 |
- READ_IMPLIES_EXEC,
|
|
|
05ad79 |
- ADDR_LIMIT_32BIT,
|
|
|
05ad79 |
- WHOLE_SECONDS,
|
|
|
05ad79 |
- STICKY_TIMEOUTS,
|
|
|
05ad79 |
- ADDR_LIMIT_3GB], [], [], [#include <linux/personality.h>])
|
|
|
05ad79 |
-
|
|
|
05ad79 |
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
|
|
05ad79 |
[[
|
|
|
05ad79 |
#ifdef HAVE_SYS_SWAP_H
|
|
|
05ad79 |
diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c
|
|
|
05ad79 |
index 0e45cfef9..9863cb298 100644
|
|
|
05ad79 |
--- a/sys-utils/setarch.c
|
|
|
05ad79 |
+++ b/sys-utils/setarch.c
|
|
|
05ad79 |
@@ -56,37 +56,37 @@ enum {
|
|
|
05ad79 |
} while(0)
|
|
|
05ad79 |
|
|
|
05ad79 |
|
|
|
05ad79 |
-#if !HAVE_DECL_UNAME26
|
|
|
05ad79 |
+#ifndef UNAME26
|
|
|
05ad79 |
# define UNAME26 0x0020000
|
|
|
05ad79 |
#endif
|
|
|
05ad79 |
-#if !HAVE_DECL_ADDR_NO_RANDOMIZE
|
|
|
05ad79 |
+#ifndef ADDR_NO_RANDOMIZE
|
|
|
05ad79 |
# define ADDR_NO_RANDOMIZE 0x0040000
|
|
|
05ad79 |
#endif
|
|
|
05ad79 |
-#if !HAVE_DECL_FDPIC_FUNCPTRS
|
|
|
05ad79 |
+#ifndef FDPIC_FUNCPTRS
|
|
|
05ad79 |
# define FDPIC_FUNCPTRS 0x0080000
|
|
|
05ad79 |
#endif
|
|
|
05ad79 |
-#if !HAVE_DECL_MMAP_PAGE_ZERO
|
|
|
05ad79 |
+#ifndef MMAP_PAGE_ZERO
|
|
|
05ad79 |
# define MMAP_PAGE_ZERO 0x0100000
|
|
|
05ad79 |
#endif
|
|
|
05ad79 |
-#if !HAVE_DECL_ADDR_COMPAT_LAYOUT
|
|
|
05ad79 |
+#ifndef ADDR_COMPAT_LAYOUT
|
|
|
05ad79 |
# define ADDR_COMPAT_LAYOUT 0x0200000
|
|
|
05ad79 |
#endif
|
|
|
05ad79 |
-#if !HAVE_DECL_READ_IMPLIES_EXEC
|
|
|
05ad79 |
+#ifndef READ_IMPLIES_EXEC
|
|
|
05ad79 |
# define READ_IMPLIES_EXEC 0x0400000
|
|
|
05ad79 |
#endif
|
|
|
05ad79 |
-#if !HAVE_DECL_ADDR_LIMIT_32BIT
|
|
|
05ad79 |
+#ifndef ADDR_LIMIT_32BIT
|
|
|
05ad79 |
# define ADDR_LIMIT_32BIT 0x0800000
|
|
|
05ad79 |
#endif
|
|
|
05ad79 |
-#if !HAVE_DECL_SHORT_INODE
|
|
|
05ad79 |
+#ifndef SHORT_INODE
|
|
|
05ad79 |
# define SHORT_INODE 0x1000000
|
|
|
05ad79 |
#endif
|
|
|
05ad79 |
-#if !HAVE_DECL_WHOLE_SECONDS
|
|
|
05ad79 |
+#ifndef WHOLE_SECONDS
|
|
|
05ad79 |
# define WHOLE_SECONDS 0x2000000
|
|
|
05ad79 |
#endif
|
|
|
05ad79 |
-#if !HAVE_DECL_STICKY_TIMEOUTS
|
|
|
05ad79 |
+#ifndef STICKY_TIMEOUTS
|
|
|
05ad79 |
# define STICKY_TIMEOUTS 0x4000000
|
|
|
05ad79 |
#endif
|
|
|
05ad79 |
-#if !HAVE_DECL_ADDR_LIMIT_3GB
|
|
|
05ad79 |
+#ifndef ADDR_LIMIT_3GB
|
|
|
05ad79 |
# define ADDR_LIMIT_3GB 0x8000000
|
|
|
05ad79 |
#endif
|
|
|
05ad79 |
|
|
|
05ad79 |
--
|
|
|
05ad79 |
2.21.0
|
|
|
05ad79 |
|