Commit aad83093 authored by Vivek Goyal's avatar Vivek Goyal Committed by H. Peter Anvin

x86, boot: Undef memcmp before providing a new definition

With CONFIG_X86_32=y, string_32.h gets pulled in compressed/string.c by
"misch.h". string_32.h defines a macro to map memcmp to __builtin_memcmp().
And that macro in turn changes the name of memcmp() defined here and
converts it to __builtin_memcmp().

I thought that's not the intention though. We probably want to provide
our own optimized definition of memcmp(). If yes, then undef the memcmp
before we define a new memcmp.
Signed-off-by: default avatarVivek Goyal <vgoyal@redhat.com>
Link: http://lkml.kernel.org/r/1395170800-11059-2-git-send-email-vgoyal@redhat.comSigned-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
parent dcb99fd9
#include "misc.h" #include "misc.h"
/* Avoid intereference from any defines in string_32.h */
#undef memcmp
int memcmp(const void *s1, const void *s2, size_t len) int memcmp(const void *s1, const void *s2, size_t len)
{ {
u8 diff; u8 diff;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment