Skip to content

Commit

Permalink
[jumbo] avoid MAP_TYPE system header symbol clashes
Browse files Browse the repository at this point in the history
Linux builds have an include chain from src/perf-jit.cc:
sys/mman.h -> bits/mman.h -> bits/mman-linux.h, which defines
a MAP_TYPE macro that conflicts with InstanceType::MAP_TYPE
in jumbo builds, for some jumbo_file_merge_limit values.

Since MAP_TYPE isn't used in perf-jit.cc, it should be safe
to #undef the macro immediately after the sys/mman.h #include
statement.

Bug: chromium:746958
Change-Id: I1339a4f56cf6783bf6121cd44c93e776af9458ba
Reviewed-on: https://chromium-review.googlesource.com/654042
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Mostyn Bramley-Moore <mostynb@opera.com>
Cr-Commit-Position: refs/heads/master@{#47971}
  • Loading branch information
mostynb authored and Commit Bot committed Sep 12, 2017
1 parent ae53f26 commit 5af9ec2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/perf-jit.cc
Expand Up @@ -37,6 +37,7 @@
#if V8_OS_LINUX
#include <fcntl.h>
#include <sys/mman.h>
#undef MAP_TYPE // jumbo: conflicts with v8::internal::InstanceType::MAP_TYPE
#include <unistd.h>
#endif // V8_OS_LINUX

Expand Down

0 comments on commit 5af9ec2

Please sign in to comment.