Skip to content

Commit faeeb8f

Browse files
authored
Fixed Windows jsglue Builds with Define for Built-in offsetof (#550)
Signed-off-by: Redfire <redfire75369@hotmail.com>
1 parent 0081fc4 commit faeeb8f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

mozjs-sys/build.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,12 @@ mod jsglue {
781781
.clang_args(["-include", &confdefs_path.to_str().expect("UTF-8")]);
782782

783783
if msvc {
784-
builder = builder.clang_args(["-fms-compatibility", "-DWIN32", "-std=c++17"])
784+
builder = builder.clang_args([
785+
"-fms-compatibility",
786+
"-DWIN32",
787+
"-D_CRT_USE_BUILTIN_OFFSETOF",
788+
"-std=c++17",
789+
])
785790
} else {
786791
builder = builder.clang_args(["-fPIC", "-fno-rtti", "-std=c++17"])
787792
}

0 commit comments

Comments
 (0)