Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 12 Apr 2012 10:24:28 +0200
From: magnum <>
Subject: Re: Usage of mempcpy in cryptsha512_fmt.c and cryptsha256_fmt.c

For the record, the second alternative below was sent from Robert as a
git pull request, and I merged it without even testing.

Thanks Robert!


On 04/12/2012 02:42 AM, Robert Ve┼żnaver wrote:
> Hi,
> there seems to be a problem with the latest jumbo-unstable, specifically: the usage of mempcpy in cryptsha512_fmt.c and cryptsha256_fmt.c.
> Since mempcpy is a GNU extension it appears that it is not supported in OS X (and probably some BSDs as well), so it cannot compile.
> There seems to be 2 solutions to this problem:
> 1)
> #ifdef __APPLE__
> void* mempcpy(void* dst, const void* src, size_t len) {
>   return (char*)memcpy(dst, src, len) + len;
> }
> #endif
> 2)
> replace:
> 	cp = mempcpy (cp, temp_result, BINARY_SIZE);
> with:
> 	cp = (char *) memcpy (cp, temp_result, BINARY_SIZE) + BINARY_SIZE;
> Solution 2 seems cleaner to me.
> Cheers,
> Robert

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.