Skip to content

Instantly share code, notes, and snippets.

@X547
X547 / 0001-fix-build-on-Haiku.patch
Created August 16, 2021 16:13
Haiku build patch for u-boot fdc4fda33051bcb9eb782001afe2bdd3c0d09eae
From 8d73f2a57df2f69cfafa29e623fec275d231f0b2 Mon Sep 17 00:00:00 2001
From: X512 <[email protected]>
Date: Tue, 17 Aug 2021 01:08:53 +0900
Subject: fix build on Haiku
---
arch/arc/lib/bootm.c | 2 +-
arch/arm/cpu/armv8/fsl-layerscape/mp.c | 2 +-
arch/arm/cpu/armv8/fsl-layerscape/spl.c | 2 +-
arch/arm/cpu/armv8/sec_firmware.c | 2 +-
drmGetDevices2()
drmIoctl(3, (100, VERSION, 64, RW)) -> (
version: 3.42.0
name: "(null)"
date: "(null)"
desc: "(null)"
drmIoctl(3, (100, VERSION, 64, RW)) -> (
version: 3.42.0
name: "amdgpu"
drmGetDevices2()
drmIoctl(3, (100, VERSION, 64, RW)) -> (
version: 3.42.0
name: "(null)"
date: "(null)"
desc: "(null)"
drmIoctl(3, (100, VERSION, 64, RW)) -> (
version: 3.42.0
name: "amdgpu"
drmGetDevices2()
drmIoctl(3, (100, VERSION, 64, RW)) -> (
version: 3.42.0
name: "(null)"
date: "(null)"
desc: "(null)"
drmIoctl(3, (100, VERSION, 64, RW)) -> (
version: 3.42.0
name: "amdgpu"
From 05ad4edd3ae1e2c84d363e6db1b2c474b68f6f44 Mon Sep 17 00:00:00 2001
From: X512 <[email protected]>
Date: Thu, 4 Nov 2021 00:51:36 +0900
Subject: [PATCH] [wip] GCC 11 fixes
Change-Id: I50d0c6843ffaf6eb2fd98cb3855a34af7f10a99c
---
build/jam/ArchitectureRules | 6 +-
build/jam/repositories/HaikuPorts/x86_64 | 8 +-
headers/compatibility/bsd/err.h | 2 +-
@X547
X547 / 0001-Haiku-fix-build-and-minimal-operation.patch
Last active January 1, 2022 07:50
Initial Wine patch for Haiku (wine-6.23). Clang is required for build.
From a94d195b2ef1188052d0b950bc889b5eb0dfc3dc Mon Sep 17 00:00:00 2001
From: X512 <[email protected]>
Date: Fri, 31 Dec 2021 08:17:23 +0900
Subject: Haiku: fix build and minimal operation
---
dlls/nsiproxy.sys/ndis.c | 10 ++++++++
dlls/ntdll/unix/file.c | 2 ++
dlls/ntdll/unix/loader.c | 4 +++
dlls/ntdll/unix/serial.c | 2 ++
@X547
X547 / FontSize.cpp
Created January 15, 2022 11:03
FontSizeFromHeight implementation and sample code.
#include <stdio.h>
#include <algorithm>
#include <Application.h>
#include <Window.h>
#include <View.h>
#include <Rect.h>
float FontSizeFromHeight(BFont font, float height)
MODULE TestUnicode2;
CONST
ph* = 0FFFDH; (* � *)
bom* = 0FEFFH;
PROCEDURE CharLen8* (ch: SHORTCHAR): INTEGER;
BEGIN
CASE ch OF
| 000X .. 07FX: RETURN 1;
| 0C0X .. 0DFX: RETURN 2;
#!/bin/sh
set -e
rm -f kernel_arch_riscv64.a && ar csrDT kernel_arch_riscv64.a \
objects/haiku/riscv64/release/system/kernel/arch/riscv64/Htif.o \
objects/haiku/riscv64/release/system/kernel/arch/riscv64/RISCV64VMTranslationMap.o \
objects/haiku/riscv64/release/system/kernel/arch/riscv64/arch_asm.o \
objects/haiku/riscv64/release/system/kernel/arch/riscv64/arch_commpage.o \
objects/haiku/riscv64/release/system/kernel/arch/riscv64/arch_cpu.o \
objects/haiku/riscv64/release/system/kernel/arch/riscv64/arch_debug.o \
@X547
X547 / Build.sh
Last active May 22, 2022 14:19
Haiku libgcc_s.so.1 stub
#!sh
set -e
gcc --shared libgcc.c -Wl,--version-script=libgcc.ver -o lib/libgcc_s.so.1