libroot: check API version to enable B_CLONEABLE_AREA on R1Beta1.

If at least one image is older than B_HAIKU_VERSION_1_PRE_BETA_2, new areas are
marked as cloneable.
Should fix #15244.

Change-Id: I82d7cad969102679084d0ad73430790278e3d15c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1849
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
Jérôme Duval 2019-09-11 20:49:32 +02:00 committed by waddlesplash
parent 66d438d128
commit 63ec1f9ae2
1 changed files with 2 additions and 0 deletions

View File

@ -17,6 +17,8 @@ create_area(const char *name, void **address, uint32 addressSpec, size_t size,
{
if (__gABIVersion < B_HAIKU_ABI_GCC_2_HAIKU)
protection |= B_EXECUTE_AREA;
if (__gAPIVersion < B_HAIKU_VERSION_1_PRE_BETA_2)
protection |= B_CLONEABLE_AREA;
return _kern_create_area(name, address, addressSpec, size, lock, protection);
}