Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/shadow/files: shadow-4.2.1-cross-size-checks.patch
Date: Thu, 30 Apr 2015 06:48:24
Message-Id: 20150430064818.C04A3986@oystercatcher.gentoo.org
1 vapier 15/04/30 06:48:16
2
3 Added: shadow-4.2.1-cross-size-checks.patch
4 Log:
5 Fix from upstream for cross-compile noticed in Chromium OS.
6
7 (Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
8
9 Revision Changes Path
10 1.1 sys-apps/shadow/files/shadow-4.2.1-cross-size-checks.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/shadow/files/shadow-4.2.1-cross-size-checks.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/shadow/files/shadow-4.2.1-cross-size-checks.patch?rev=1.1&content-type=text/plain
14
15 Index: shadow-4.2.1-cross-size-checks.patch
16 ===================================================================
17 From 2cb54158b80cdbd97ca3b36df83f9255e923ae3f Mon Sep 17 00:00:00 2001
18 From: James Le Cuirot <chewi@××××××××××××××.uk>
19 Date: Sat, 23 Aug 2014 09:46:39 +0100
20 Subject: [PATCH] Check size of uid_t and gid_t using AC_CHECK_SIZEOF
21
22 This built-in check is simpler than the previous method and, most
23 importantly, works when cross-compiling.
24
25 Signed-off-by: Serge Hallyn <serge.hallyn@××××××.com>
26 ---
27 configure.in | 14 ++++----------
28 1 file changed, 4 insertions(+), 10 deletions(-)
29
30 diff --git a/configure.in b/configure.in
31 index 1a3f841..4a4d6d0 100644
32 --- a/configure.in
33 +++ b/configure.in
34 @@ -335,16 +335,10 @@ if test "$enable_subids" != "no"; then
35 dnl
36 dnl FIXME: check if 32 bit UIDs/GIDs are supported by libc
37 dnl
38 - AC_RUN_IFELSE([AC_LANG_SOURCE([
39 -#include <sys/types.h>
40 -int main(void) {
41 - uid_t u;
42 - gid_t g;
43 - return (sizeof u < 4) || (sizeof g < 4);
44 -}
45 - ])], [id32bit="yes"], [id32bit="no"])
46 -
47 - if test "x$id32bit" = "xyes"; then
48 + AC_CHECK_SIZEOF([uid_t],, [#include "sys/types.h"])
49 + AC_CHECK_SIZEOF([gid_t],, [#include "sys/types.h"])
50 +
51 + if test "$ac_cv_sizeof_uid_t" -ge 4 && test "$ac_cv_sizeof_gid_t" -ge 4; then
52 AC_DEFINE(ENABLE_SUBIDS, 1, [Define to support the subordinate IDs.])
53 enable_subids="yes"
54 else
55 --
56 2.3.6