Bug 1561636 - intermittent updater failures on Win64 (Error 19) r=rstrong
authorKathy Brade <brade@pearlcrescent.com>
Thu, 27 Jun 2019 09:11:48 +0000
changeset 480360 98a5a4864b88bceb374f48c841fc8c67fb3b1eed
parent 480359 9e789088540dda5dfc37742e9351d5109bc9a7bf
child 480361 e17ee766fc37ffba91f46031eddc9b85a0021a5d
push id36211
push userrmaries@mozilla.com
push dateThu, 27 Jun 2019 21:47:35 +0000
treeherdermozilla-central@7ffabb358c42 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrstrong
bugs1561636
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1561636 - intermittent updater failures on Win64 (Error 19) r=rstrong Avoid MinGW's _ftelli64() and _fseeki64() implementations because they are unreliable. Differential Revision: https://phabricator.services.mozilla.com/D36037
modules/libmar/src/mar_private.h
--- a/modules/libmar/src/mar_private.h
+++ b/modules/libmar/src/mar_private.h
@@ -50,18 +50,25 @@ MOZ_STATIC_ASSERT(sizeof(BLOCKSIZE) <
 #define PIB_MAX_MAR_CHANNEL_ID_SIZE 63
 #define PIB_MAX_PRODUCT_VERSION_SIZE 31
 
 /* The mar program is compiled as a host bin so we don't have access to NSPR at
    runtime.  For that reason we use ntohl, htonl, and define HOST_TO_NETWORK64
    instead of the NSPR equivalents. */
 #ifdef XP_WIN
 #include <winsock2.h>
+#ifdef __MINGW32__
+/* Avoid MinGW's _ftelli64() and _fseeki64() implementations because they
+ * are unreliable. */
+#define ftello ftello64
+#define fseeko fseeko64
+#else
 #define ftello _ftelli64
 #define fseeko _fseeki64
+#endif
 #else
 #define _FILE_OFFSET_BITS 64
 #include <netinet/in.h>
 #include <unistd.h>
 #endif
 
 #include <stdio.h>