Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Feb 2003 10:04:42 -0600
From:      "Jacques A. Vidrine" <nectar@FreeBSD.org>
To:        Dag-Erling Smorgrav <des@ofug.org>
Cc:        Kris Kennaway <kris@obsecurity.org>, current@FreeBSD.org
Subject:   Re: memset prototype changed?
Message-ID:  <20030218160442.GB81793@madman.celabo.org>
In-Reply-To: <xzpheb1yhrq.fsf@flood.ping.uio.no>
References:  <20030218105240.GH92966@rot13.obsecurity.org> <xzpheb1yhrq.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Feb 18, 2003 at 12:01:29PM +0100, Dag-Erling Smorgrav wrote:
> Kris Kennaway <kris@obsecurity.org> writes:
> > http://bento.freebsd.org/errorlogs/i386-5-latest/netatalk-1.6.0_1,1.log
> 
> The code that fails to compile is blatantly wrong:
> 
>     memset(schedule, 0, sizeof(schedule));

I wouldn't say `blantantly'.  The expressions `schedule' and
`&schedule' are equivalent when `schedule' is an array type.
I'd call it `ignoring an idiom'.

Anyway, with libdes or OpenSSL < 0.9.7, the type of `schedule'
would have been an array.  With OpenSSL >= 0.9.7, the type of
`schedule' is a struct.

This port uses <des.h>, which we have as a symlink to <openssl/des.h>
(ugh, I'd better remove that, too).  If that include is replaced with
e.g.

  #ifdef HAVE_OPENSSL
  #define OPENSSL_DES_LIBDES_COMPATIBILITY
  #include <openssl/des.h>
  #else
  #include <des.h>
  #endif

things will be fine.
-- 
Jacques A. Vidrine <nectar@celabo.org>          http://www.celabo.org/
NTT/Verio SME          .     FreeBSD UNIX     .       Heimdal Kerberos
jvidrine@verio.net     .  nectar@FreeBSD.org  .          nectar@kth.se

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030218160442.GB81793>