From: Joerg Sonnenberger Date: Tue, 21 Jun 2016 13:03:08 +0000 (+0200) Subject: Many systems have bswap16 in system headers, so undef it first to avoid X-Git-Tag: v3.2.2~54 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=43d23948f5fd86226fc47e78ce718283ead4f16a;p=thirdparty%2Flibarchive.git Many systems have bswap16 in system headers, so undef it first to avoid compiler warnings. --- diff --git a/libarchive/archive_read_support_format_lha.c b/libarchive/archive_read_support_format_lha.c index c359d83ef..dbfc1cd87 100644 --- a/libarchive/archive_read_support_format_lha.c +++ b/libarchive/archive_read_support_format_lha.c @@ -1712,6 +1712,7 @@ lha_crc16(uint16_t crc, const void *pp, size_t len) for (;len >= 8; len -= 8) { /* This if statement expects compiler optimization will * remove the stament which will not be executed. */ +#undef bswap16 #if defined(_MSC_VER) && _MSC_VER >= 1400 /* Visual Studio */ # define bswap16(x) _byteswap_ushort(x) #elif (defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 8) \