1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 23:35:08 +00:00

Lagom: Add LibGemini, LibGfx

They are dependencies of LibWeb and might be useful for
running test-web on GitHub actions one day.
This commit is contained in:
Nico Weber 2020-07-23 14:34:53 -04:00 committed by Andreas Kling
parent c4d9d5cc54
commit 3f45e9ab1e
8 changed files with 179 additions and 22 deletions

View file

@ -213,7 +213,15 @@ RefPtr<Font> Font::load_from_file(const StringView& path)
bool Font::write_to_file(const StringView& path)
{
int fd = creat_with_path_length(path.characters_without_null_termination(), path.length(), 0644);
int fd;
#ifdef __serenity__
fd = creat_with_path_length(path.characters_without_null_termination(), path.length(), 0644);
#else
{
String null_terminated_path = path;
fd = creat(null_terminated_path.characters(), 0644);
}
#endif
if (fd < 0) {
perror("open");
return false;