mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:47:34 +00:00
Everywhere: Replace uses of __serenity__ with AK_OS_SERENITY
Now that we have OS macros for essentially every supported OS, let's try to use them everywhere.
This commit is contained in:
parent
896d4e8dc1
commit
828441852f
46 changed files with 118 additions and 113 deletions
|
@ -26,7 +26,7 @@
|
|||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifndef __serenity__
|
||||
#ifndef AK_OS_SERENITY
|
||||
static void* mmap_with_name(void* addr, size_t length, int prot, int flags, int fd, off_t offset, char const*)
|
||||
{
|
||||
return mmap(addr, length, prot, flags, fd, offset);
|
||||
|
@ -239,7 +239,7 @@ Result<NonnullRefPtr<DynamicObject>, DlErrorMessage> DynamicLoader::load_stage_3
|
|||
return DlErrorMessage { String::formatted("mprotect .relro: PROT_READ: {}", strerror(errno)) };
|
||||
}
|
||||
|
||||
#ifdef __serenity__
|
||||
#ifdef AK_OS_SERENITY
|
||||
if (set_mmap_name(m_relro_segment_address.as_ptr(), m_relro_segment_size, String::formatted("{}: .relro", m_filepath).characters()) < 0) {
|
||||
return DlErrorMessage { String::formatted("set_mmap_name .relro: {}", strerror(errno)) };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue