Alternative to #24 - in particular, internal.patch did not apply cleanly against 4.9 so it has been replaced with invocations of sed for the same purpose. The diff between this PR and that one:
diff --git a/import.sh b/import.sh
index c62dc00..5a125cc 100755
--- a/import.sh
+++ b/import.sh
@@ -7,7 +7,11 @@ find . -type l -not -path './.git/*' | xargs rm
curl -sL https://github.com/facebook/rocksdb/archive/v4.9.tar.gz | tar zxf - -C internal --strip-components=1
make -C internal util/build_version.cc
patch -p1 < gitignore.patch
-patch -p1 < internal.patch
+# Downcase some windows-only includes for compatibility with mingw64.
+grep -lRF '<Windows.h>' internal | xargs sed -i~ 's!<Windows.h>!<windows.h>!g'
+grep -lRF '<Rpc.h>' internal | xargs sed -i~ 's!<Rpc.h>!<rpc.h>!g'
+# Avoid MSVC-only extensions for compatibility with mingw64.
+grep -lRF 'i64;' internal | xargs sed -i~ 's!i64;!LL;!g'
# symlink so cgo compiles them
for source_file in $(make sources | grep -vE '(/redis/|(_(cmd|tool)|(env|port)_[a-z]+).cc$)'); do
diff --git a/internal.patch b/internal.patch
deleted file mode 100644
index 7613ea9..0000000
--- a/internal.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-diff --git a/internal/port/win/env_win.cc b/internal/port/win/env_win.cc
-index fb323e2..9f54d64 100644
---- a/internal/port/win/env_win.cc
-+++ b/internal/port/win/env_win.cc
-@@ -35,8 +35,8 @@
- #include "util/thread_status_updater.h"
- #include "util/thread_status_util.h"
-
--#include <Rpc.h> // For UUID generation
--#include <Windows.h>
-+#include <rpc.h> // For UUID generation
-+#include <windows.h>
-
- namespace rocksdb {
-
-@@ -1665,7 +1665,7 @@ class WinEnv : public Env {
- if (GetSystemTimePreciseAsFileTime_ != NULL) {
- // all std::chrono clocks on windows proved to return
- // values that may repeat that is not good enough for some uses.
-- const int64_t c_UnixEpochStartTicks = 116444736000000000i64;
-+ const int64_t c_UnixEpochStartTicks = 116444736000000000LL;
- const int64_t c_FtToMicroSec = 10;
-
- // This interface needs to return system time and not
-diff --git a/internal/port/win/win_logger.h b/internal/port/win/win_logger.h
-index a85f24c..5f73619 100644
---- a/internal/port/win/win_logger.h
-+++ b/internal/port/win/win_logger.h
-@@ -17,7 +17,7 @@
- #include "rocksdb/env.h"
-
- #include <stdint.h>
--#include <Windows.h>
-+#include <windows.h>
-
- namespace rocksdb {
-
diff --git a/internal/db/c_test.c b/internal/db/c_test.c
index 7236e01..30fbcae 100644
--- a/internal/db/c_test.c
+++ b/internal/db/c_test.c
@@ -19,7 +19,7 @@
// Can not use port/port.h macros as this is a c file
#ifdef OS_WIN
-#include <Windows.h>
+#include <windows.h>
# define snprintf _snprintf
diff --git a/internal/port/win/io_win.h b/internal/port/win/io_win.h
index 8c3a4ba..dfbdf2e 100644
--- a/internal/port/win/io_win.h
+++ b/internal/port/win/io_win.h
@@ -16,7 +16,7 @@
#include <string>
#include <stdint.h>
-#include <Windows.h>
+#include <windows.h>
#include <mutex>
diff --git a/internal/port/win/xpress_win.cc b/internal/port/win/xpress_win.cc
index a0206b5..f36a452 100644
--- a/internal/port/win/xpress_win.cc
+++ b/internal/port/win/xpress_win.cc
@@ -8,7 +8,7 @@
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#include "port/win/xpress_win.h"
-#include <Windows.h>
+#include <windows.h>
#include <cassert>
#include <memory>
diff --git a/internal/util/build_version.cc b/internal/util/build_version.cc
index 958702d..e339d64 100644
--- a/internal/util/build_version.cc
+++ b/internal/util/build_version.cc
@@ -1,4 +1,4 @@
#include "build_version.h"
-const char* rocksdb_build_git_sha = "rocksdb_build_git_sha:ab57b321a358f4c93fb639331ac3e10911649492";
-const char* rocksdb_build_git_date = "rocksdb_build_git_date:2016-08-24";
+const char* rocksdb_build_git_sha = "rocksdb_build_git_sha:095db6e1abfca81fbda87ba79012dab910569ae9";
+const char* rocksdb_build_git_date = "rocksdb_build_git_date:2016-08-25";
const char* rocksdb_build_compile_date = __DATE__;
Alternative to #24 - in particular,
internal.patch
did not apply cleanly against 4.9 so it has been replaced with invocations ofsed
for the same purpose. The diff between this PR and that one: