aboutsummaryrefslogtreecommitdiffstats
path: root/community/shadow/cross-size-checks.patch
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-08-17 21:26:45 +0200
committerJakub Jirutka <jakub@jirutka.cz>2016-08-17 21:26:45 +0200
commitc95b4aa8b02aed915ec840f8f291073157816b97 (patch)
tree1a501600f70c6033207e89ee9d1f16cb14bdbce4 /community/shadow/cross-size-checks.patch
parent6896ed31feda6db35c99fc916f6ce9835694c98e (diff)
downloadaports-c95b4aa8b02aed915ec840f8f291073157816b97.tar.bz2
aports-c95b4aa8b02aed915ec840f8f291073157816b97.tar.xz
community/shadow: move from testing
Diffstat (limited to 'community/shadow/cross-size-checks.patch')
-rw-r--r--community/shadow/cross-size-checks.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/community/shadow/cross-size-checks.patch b/community/shadow/cross-size-checks.patch
new file mode 100644
index 0000000000..bd451ba1bb
--- /dev/null
+++ b/community/shadow/cross-size-checks.patch
@@ -0,0 +1,42 @@
+From 2cb54158b80cdbd97ca3b36df83f9255e923ae3f Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@aura-online.co.uk>
+Date: Sat, 23 Aug 2014 09:46:39 +0100
+Subject: [PATCH] Check size of uid_t and gid_t using AC_CHECK_SIZEOF
+
+This built-in check is simpler than the previous method and, most
+importantly, works when cross-compiling.
+
+Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
+---
+ configure.in | 14 ++++----------
+ 1 file changed, 4 insertions(+), 10 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 1a3f841..4a4d6d0 100644
+--- a/configure.in
++++ b/configure.in
+@@ -335,16 +335,10 @@ if test "$enable_subids" != "no"; then
+ dnl
+ dnl FIXME: check if 32 bit UIDs/GIDs are supported by libc
+ dnl
+- AC_RUN_IFELSE([AC_LANG_SOURCE([
+-#include <sys/types.h>
+-int main(void) {
+- uid_t u;
+- gid_t g;
+- return (sizeof u < 4) || (sizeof g < 4);
+-}
+- ])], [id32bit="yes"], [id32bit="no"])
+-
+- if test "x$id32bit" = "xyes"; then
++ AC_CHECK_SIZEOF([uid_t],, [#include "sys/types.h"])
++ AC_CHECK_SIZEOF([gid_t],, [#include "sys/types.h"])
++
++ if test "$ac_cv_sizeof_uid_t" -ge 4 && test "$ac_cv_sizeof_gid_t" -ge 4; then
+ AC_DEFINE(ENABLE_SUBIDS, 1, [Define to support the subordinate IDs.])
+ enable_subids="yes"
+ else
+--
+2.3.6
+
+