 +#include "mman.c"
  #include <sys/stat.h>
  #include <thread>
- #include <unistd.h> // ftruncate
+-#include <unistd.h> // ftruncate
++#include "unistd.h"
+ #include <unordered_map>
+ #include <unordered_set>
+ #include <vector>
 @@ -689,4 +689,4 @@ void applybpe_stream(const char *codesPath, const char *vocabPath) {
    }
  }

++
++int mprotect(void *addr, size_t len, int prot)
++{
++    DWORD newProtect = __map_mmap_prot_page(prot);
++    DWORD oldProtect = 0;
++
++    if (VirtualProtect(addr
\ No newline at end of file
diff --git a/fastBPE/unistd.h b/fastBPE/unistd.h
new file mode 100644

++#include "mman.c"
+ #include <sys/stat.h>
+ #include <thread>
+-#include <unistd.h> // ftruncate
++#include "unistd.h"
+ #include <unordered_map>
+ #include <unordered_set>
+ #include <vector>
+@@ -689,4 +689,4 @@ void applybpe_stream(const char *codesPath, const char *vocabPath) {
+   }
+ }
