vapier      15/04/30 06:48:16

  Added:                shadow-4.2.1-cross-size-checks.patch
  Log:
  Fix from upstream for cross-compile noticed in Chromium OS.
  
  (Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 
D2E96200)

Revision  Changes    Path
1.1                  sys-apps/shadow/files/shadow-4.2.1-cross-size-checks.patch

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
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

Index: shadow-4.2.1-cross-size-checks.patch
===================================================================
>From 2cb54158b80cdbd97ca3b36df83f9255e923ae3f Mon Sep 17 00:00:00 2001
From: James Le Cuirot <[email protected]>
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 <[email protected]>
---
 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





Reply via email to