Ports: Unbreak editline

This port uses incomplete function prototypes, which are no longer
supported as of C23.

Additionally, it failed to compile due to a missing <sys/select.h>
include. For some reason, there was already an upstream patch for this,
but it wasn't included in our patches.
This commit is contained in:
Sönke Holz
2026-02-27 14:41:06 +01:00
committed by Sönke Holz
parent cd7f148558
commit 22a20658e7
3 changed files with 37 additions and 0 deletions

View File

@@ -8,3 +8,6 @@ config_sub_paths=('aux/config.sub')
files=(
"https://github.com/troglobit/editline/releases/download/${version}/editline-${version}.tar.gz#781e03b6a935df75d99fb963551e2e9f09a714a8c49fc53280c716c90bf44d26"
)
configopts=(
'CFLAGS=-std=c17'
)

View File

@@ -0,0 +1,24 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stephen Gregoratto <dev@sgregoratto.me>
Date: Tue, 9 Jun 2020 00:21:11 +1000
Subject: [PATCH] include <sys/select.h> in excallback
Fixes an build issue when cross-compiling for SerenityOS[1]
[1] https://github.com/SerenityOS/serenity
---
examples/excallback.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/examples/excallback.c b/examples/excallback.c
index 015132a992da46ba23c66649e7f12a0041133cf9..5a5efb327b64243ad85486392841c338fe498633 100644
--- a/examples/excallback.c
+++ b/examples/excallback.c
@@ -39,6 +39,7 @@ Jeff
#include <stdio.h>
#include <sys/types.h>
+#include <sys/select.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>

View File

@@ -0,0 +1,10 @@
# Patches for editline on SerenityOS
## `0001-include-sys-select.h-in-excallback.patch`
include <sys/select.h> in excallback
Fixes an build issue when cross-compiling for SerenityOS[1]
[1] https://github.com/SerenityOS/serenity