]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Workaround missing byte swap symbol on VS 7.1 Debug builds
authorBrad King <brad.king@kitware.com>
Wed, 21 Oct 2015 16:00:41 +0000 (12:00 -0400)
committerBrad King <brad.king@kitware.com>
Mon, 26 Oct 2015 12:59:26 +0000 (08:59 -0400)
The VS 7.1 MS C Debug runtime library does not export _byteswap_ushort.

libarchive/archive_read_support_format_lha.c

index f8e01af8115b9d0ca50f43821267c8bc0dfdf057..c359d83ef97a05fd0e0f0559895c8c6f7fca82c3 100644 (file)
@@ -1712,7 +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. */
-#ifdef _MSC_VER  /* Visual Studio */
+#if defined(_MSC_VER) && _MSC_VER >= 1400  /* Visual Studio */
 #  define bswap16(x) _byteswap_ushort(x)
 #elif (defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 8) \
       || defined(__clang__)