From dca0edff2fb312e05fd7f2d560fb80bc97a38350 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Sun, 29 Apr 2007 15:06:44 +1000 Subject: [PATCH] - (dtucker) [configure.ac defines.h] Have configure check for offsetof to prevent redefinition warnings. --- ChangeLog | 4 +++- configure.ac | 8 ++++++-- defines.h | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index db5cf6adb..19c4e4f74 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,8 @@ - (dtucker) [openbsd-compat/xmmap.c] Include stdlib.h for mkstemp prototype. - (dtucker) [configure.ac defines.h] Prevent warnings about __attribute__ __nonnull__ for versions of GCC that don't support it. + - (dtucker) [configure.ac defines.h] Have configure check for offsetof + to prevent redefinition warnings. 20070406 - (dtucker) [INSTALL] Update the systems that have PAM as standard. Link @@ -2895,4 +2897,4 @@ OpenServer 6 and add osr5bigcrypt support so when someone migrates passwords between UnixWare and OpenServer they will still work. OK dtucker@ -$Id: ChangeLog,v 1.4657 2007/04/29 04:49:21 dtucker Exp $ +$Id: ChangeLog,v 1.4658 2007/04/29 05:06:44 dtucker Exp $ diff --git a/configure.ac b/configure.ac index c113b2fa7..dbe77cbba 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -# $Id: configure.ac,v 1.378 2007/04/29 04:49:21 dtucker Exp $ +# $Id: configure.ac,v 1.379 2007/04/29 05:06:44 dtucker Exp $ # # Copyright (c) 1999-2004 Damien Miller # @@ -15,7 +15,7 @@ # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org) -AC_REVISION($Revision: 1.378 $) +AC_REVISION($Revision: 1.379 $) AC_CONFIG_SRCDIR([ssh.c]) AC_CONFIG_HEADER(config.h) @@ -1375,6 +1375,10 @@ AC_CHECK_DECLS(MAXSYMLINKS, , , [ #include ]) +AC_CHECK_DECLS(offsetof, , , [ +#include + ]) + AC_CHECK_FUNCS(setresuid, [ dnl Some platorms have setresuid that isn't implemented, test for this AC_MSG_CHECKING(if setresuid seems to work) diff --git a/defines.h b/defines.h index 5e75bc624..336880c96 100644 --- a/defines.h +++ b/defines.h @@ -25,7 +25,7 @@ #ifndef _DEFINES_H #define _DEFINES_H -/* $Id: defines.h,v 1.141 2007/04/29 04:49:21 dtucker Exp $ */ +/* $Id: defines.h,v 1.142 2007/04/29 05:06:45 dtucker Exp $ */ /* Constants */ @@ -491,7 +491,7 @@ struct winsize { (struct cmsghdr *)NULL) #endif /* CMSG_FIRSTHDR */ -#ifndef offsetof +#if defined(HAVE_DECL_OFFSETOF) && HAVE_DECL_OFFSETOF == 0 # define offsetof(type, member) ((size_t) &((type *)0)->member) #endif