]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Many systems have bswap16 in system headers, so undef it first to avoid
authorJoerg Sonnenberger <joerg@bec.de>
Tue, 21 Jun 2016 13:03:08 +0000 (15:03 +0200)
committerJoerg Sonnenberger <joerg@bec.de>
Tue, 21 Jun 2016 13:03:08 +0000 (15:03 +0200)
compiler warnings.

libarchive/archive_read_support_format_lha.c

index c359d83ef97a05fd0e0f0559895c8c6f7fca82c3..dbfc1cd87c86d6b9e8b70eb4568bd97441465fa0 100644 (file)
@@ -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) \