summaryrefslogtreecommitdiff
path: root/dev-db/cdb
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-11-27 02:00:01 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-11-27 02:00:01 +0000
commitead7697a01fd631b56240b2d58aedd98ba7f92d3 (patch)
treec73ecbedbb9db967a7dff614f5e8b79eacb79f5d /dev-db/cdb
parent403335d7014372971e9e9267493a808d08bab48e (diff)
gentoo auto-resync : 27:11:2024 - 02:00:00
Diffstat (limited to 'dev-db/cdb')
-rw-r--r--dev-db/cdb/Manifest3
-rw-r--r--dev-db/cdb/cdb-0.75-r5.ebuild61
-rw-r--r--dev-db/cdb/files/cdb-C99.patch482
-rw-r--r--dev-db/cdb/files/cdb-make-type.patch119
4 files changed, 665 insertions, 0 deletions
diff --git a/dev-db/cdb/Manifest b/dev-db/cdb/Manifest
index ced8cd4eddfd..56fef2190b01 100644
--- a/dev-db/cdb/Manifest
+++ b/dev-db/cdb/Manifest
@@ -1,6 +1,9 @@
+AUX cdb-C99.patch 11772 BLAKE2B c3052fee52bb81a80a178d14022a51df93d82242f0e24bee239320d5c0ac9a4f406d675c7ee835d94c964a0fa7935ddc1ea72f1454e50b31ef7f65ca7280ba0e SHA512 6ce0f0f6834f0640b750ebfd3d86ec9e04cbfe76676d7a0ef78871ff10af68ce471b3fdedee3086ae23c6e18e6ef18bccd9cd406e6c8580257a6c5c0deb2638b
AUX cdb-errno.patch 170 BLAKE2B 806a8f0b83fef34796705596f7e4c2896d3ef56d0209a5a181d46dbaa87268620a2d1cf4ee3ae1fa8890886d8f9db2b8c417cb51a4b9dc11802ed33f1b14c4f7 SHA512 00b39bf8cda478a3e3e5851eb7e2dd154bd547d6fdf73d3de5ca6f6ac565aca7a275b67bbde988249f4daabddbcee4ba5509cc079c2533f42268cfa5b39984cb
AUX cdb-inline.patch 251 BLAKE2B 16c4dd5cc00f243a51196977988fcae53365bab4b1a0034d44e24b5c5c0b3c6b819dfa00f6fd7ce583722f97847cba7e6b24b53596639a7df1fd0da42910c35c SHA512 c8d4cf0772b7373160c600ba1494f4933c62c9e1df929695c754c4e51ebaec4387d5f8e8739c88e0b82463bc26e8bd0c2060c43dffcfdb79431d2038f100a617
+AUX cdb-make-type.patch 3027 BLAKE2B e147296b425ee0c739c759f40bcf341b75f5e3bd1f8c4b3d8ed1e94f8730e1d8d552ee8cb68b843aeecfc052347307c50c993909382b8c39db361d58a6f2144a SHA512 0a110c94ba0acf9f9caf2743be01bacd576a4de8316ec36a7f9107da6617133154834e30bd9a4ff790cc4555139cf5346cb5cf724d8a69d9e59347216f9df55a
AUX cdb-stdint.patch 8956 BLAKE2B af2815290b395a23cb58a48b49361aa648d461ca247f6cba5fec7dfb0634be4fa1c09e4fc11536ff22dd5c221024cd0391d714fbb7fb160b91343111cebc37ca SHA512 2589722307e4b8c9e6e010a0a452a987bf5190bbaf20ece85b54666dd6633f30c85b443bddc31e70ea4024912a3999cd7197a0ac06cf86dbaf00c8b82551ae36
DIST cdb-0.75.tar.gz 54162 BLAKE2B 7b488bf330b2aac88a1cca82a6a49e24d0fd953c77935231a31bd72cc0936a37628736b5b22ea0d58aaa77cd118976ab8aa82ccc080f99e190e3f1db5d51b622 SHA512 6faeab91a77457348b58f685e81000b83fb609691317198a06284c5c62dee1e4d6138f90be1e727021f279d740169c175a21b23c96adb39a654e3f7fafdf36c0
EBUILD cdb-0.75-r4.ebuild 1479 BLAKE2B e305b9959b5904229ad0cbada62eaa2a7c4272078831a825e0deee2639107881213ba3ec7b975bc9bb17bf49d5eb127818b1491f484f2b546439182d60f3c10b SHA512 1935beba1e232d26c9da189396dbd26e4d523df5c9879fb1c508794e5770ec0add2b71e7e2071e721482eb8fc9e46bedb9d7cc77fa3dddfdb52242fc1e90186a
+EBUILD cdb-0.75-r5.ebuild 1554 BLAKE2B 74425f6163d9ec8d081068fcbf881e5c4b5fbc3f2390407e2bd2dff97f77a3288b6748eabc393c3b6f47b19593181758817166529ca46eabc73f1b5cd8dd93c7 SHA512 78b29de949b6d789be5124a26555907d22ab8bd882e019435166740d4d8f95d65957ebd5399eaf3f430db2b80679c0faaa1d9c888d51c1ce9c723131361241e4
MISC metadata.xml 249 BLAKE2B a37da98d387308dab889eab2665b67e4176707f3c115a7a69cb7f4b19f9864b96bc2fe70efa105e627c4b57a7d626f6b23dc2709a225a9debada3356f3cf32a0 SHA512 a5095fb01e05f24583a962e36131b2f02cf2d1dd7a97051200e465ad97db014721de7c1857f5eb736cb0290682e8de833cb4c735f7de8d98cdfae1aed6d3d549
diff --git a/dev-db/cdb/cdb-0.75-r5.ebuild b/dev-db/cdb/cdb-0.75-r5.ebuild
new file mode 100644
index 000000000000..e8a80d0d92fb
--- /dev/null
+++ b/dev-db/cdb/cdb-0.75-r5.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Fast, reliable, simple package for creating and reading constant databases"
+HOMEPAGE="https://cr.yp.to/cdb.html"
+SRC_URI="https://cr.yp.to/${PN}/${P}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE=""
+
+RDEPEND="!dev-db/tinycdb"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-errno.patch
+ "${FILESDIR}"/${PN}-inline.patch
+ "${FILESDIR}"/${PN}-stdint.patch
+ "${FILESDIR}"/${PN}-C99.patch
+ "${FILESDIR}"/${PN}-make-type.patch
+)
+DOCS=( CHANGES README TODO VERSION )
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e "s/head -1/head -n 1/g" \
+ -e "s/ar /$(tc-getAR) /" \
+ -e "s/ranlib /$(tc-getRANLIB) /" \
+ Makefile
+}
+
+src_configure() {
+ echo "$(tc-getCC) ${CFLAGS} -fPIC" >conf-cc || die
+ echo "$(tc-getCC) ${LDFLAGS}" >conf-ld || die
+ echo "${EPREFIX}/usr" >conf-home || die
+}
+
+src_install() {
+ dobin ${PN}{dump,get,make{,-12,-sv},stats,test}
+
+ # ok so ... first off, some automakes fail at finding
+ # cdb.a, so install that now
+ dolib.a *.a
+ # then do this pretty little symlinking to solve the somewhat
+ # cosmetic library issue at hand
+ dosym ${PN}.a /usr/$(get_libdir)/lib${PN}.a
+
+ # uint32.h needs installation too, otherwise compiles depending
+ # on it will fail
+ insinto /usr/include/${PN}
+ doins ${PN}*.h {alloc,buffer,uint32}.h
+
+ einstalldocs
+}
diff --git a/dev-db/cdb/files/cdb-C99.patch b/dev-db/cdb/files/cdb-C99.patch
new file mode 100644
index 000000000000..8e201904ad52
--- /dev/null
+++ b/dev-db/cdb/files/cdb-C99.patch
@@ -0,0 +1,482 @@
+Patch by Vladislav Dudar from https://bugs.gentoo.org/874963
+diff -Naur a/alloc.c b/alloc.c
+--- a/alloc.c 2024-03-02 22:40:29.336632203 +0300
++++ b/alloc.c 2024-03-02 22:44:54.890055799 +0300
+@@ -1,7 +1,6 @@
++#include <stdlib.h>
+ #include "alloc.h"
+ #include "error.h"
+-extern char *malloc();
+-extern void free();
+
+ #define ALIGNMENT 16 /* XXX: assuming that this alignment is enough */
+ #define SPACE 4096 /* must be multiple of ALIGNMENT */
+diff -Naur a/auto-str.c b/auto-str.c
+--- a/auto-str.c 2024-03-02 22:40:29.336632203 +0300
++++ b/auto-str.c 2024-03-02 22:44:23.263775501 +0300
+@@ -1,17 +1,17 @@
++#include <stdio.h>
+ #include "buffer.h"
+-#include "readwrite.h"
+ #include "exit.h"
+
+ char buf1[256];
+ buffer ss1 = BUFFER_INIT(write,1,buf1,sizeof(buf1));
+
+-void puts(s)
++void puts_djb(s)
+ char *s;
+ {
+ if (buffer_puts(&ss1,s) == -1) _exit(111);
+ }
+
+-main(argc,argv)
++void main(argc,argv)
+ int argc;
+ char **argv;
+ {
+@@ -25,20 +25,20 @@
+ value = argv[2];
+ if (!value) _exit(100);
+
+- puts("char ");
+- puts(name);
+- puts("[] = \"\\\n");
++ puts_djb("char ");
++ puts_djb(name);
++ puts_djb("[] = \"\\\n");
+
+ while (ch = *value++) {
+- puts("\\");
++ puts_djb("\\");
+ octal[3] = 0;
+ octal[2] = '0' + (ch & 7); ch >>= 3;
+ octal[1] = '0' + (ch & 7); ch >>= 3;
+ octal[0] = '0' + (ch & 7);
+- puts(octal);
++ puts_djb(octal);
+ }
+
+- puts("\\\n\";\n");
++ puts_djb("\\\n\";\n");
+ if (buffer_flush(&ss1) == -1) _exit(111);
+ _exit(0);
+ }
+diff -Naur a/buffer_0.c b/buffer_0.c
+--- a/buffer_0.c 2024-03-02 22:40:29.336632203 +0300
++++ b/buffer_0.c 2024-03-02 22:44:23.267108794 +0300
+@@ -1,4 +1,3 @@
+-#include "readwrite.h"
+ #include "buffer.h"
+
+ int buffer_0_read(fd,buf,len) int fd; char *buf; int len;
+diff -Naur a/buffer_1.c b/buffer_1.c
+--- a/buffer_1.c 2024-03-02 22:40:29.336632203 +0300
++++ b/buffer_1.c 2024-03-02 22:44:23.267108794 +0300
+@@ -1,4 +1,3 @@
+-#include "readwrite.h"
+ #include "buffer.h"
+
+ char buffer_1_space[BUFFER_OUTSIZE];
+diff -Naur a/buffer_1s.c b/buffer_1s.c
+--- a/buffer_1s.c 2024-03-02 22:40:29.336632203 +0300
++++ b/buffer_1s.c 2024-03-02 22:44:23.280441964 +0300
+@@ -1,4 +1,3 @@
+-#include "readwrite.h"
+ #include "buffer.h"
+
+ char buffer_1small_space[256];
+diff -Naur a/buffer_2.c b/buffer_2.c
+--- a/buffer_2.c 2024-03-02 22:40:29.336632203 +0300
++++ b/buffer_2.c 2024-03-02 22:44:23.280441964 +0300
+@@ -1,4 +1,3 @@
+-#include "readwrite.h"
+ #include "buffer.h"
+
+ char buffer_2_space[256];
+diff -Naur a/buffer.c b/buffer.c
+--- a/buffer.c 2024-03-02 22:40:29.336632203 +0300
++++ b/buffer.c 2024-03-02 22:44:23.280441964 +0300
+@@ -1,6 +1,6 @@
+ #include "buffer.h"
+
+-void buffer_init(buffer *s,int (*op)(),int fd,char *buf,unsigned int len)
++void buffer_init(buffer *s,ssize_t (*op)(),int fd,char *buf,unsigned int len)
+ {
+ s->x = buf;
+ s->fd = fd;
+diff -Naur a/buffer_get.c b/buffer_get.c
+--- a/buffer_get.c 2024-03-02 22:40:29.336632203 +0300
++++ b/buffer_get.c 2024-03-02 22:44:23.280441964 +0300
+@@ -2,9 +2,9 @@
+ #include "byte.h"
+ #include "error.h"
+
+-static int oneread(int (*op)(),int fd,char *buf,unsigned int len)
++static int oneread(long int (*op)(),int fd,char *buf,unsigned int len)
+ {
+- int r;
++ long int r;
+
+ for (;;) {
+ r = op(fd,buf,len);
+diff -Naur a/buffer.h b/buffer.h
+--- a/buffer.h 2024-03-02 22:40:29.336632203 +0300
++++ b/buffer.h 2024-03-02 22:44:23.280441964 +0300
+@@ -1,19 +1,21 @@
+ #ifndef BUFFER_H
+ #define BUFFER_H
+
++#include <unistd.h>
++
+ typedef struct buffer {
+ char *x;
+ unsigned int p;
+ unsigned int n;
+ int fd;
+- int (*op)();
++ ssize_t (*op)();
+ } buffer;
+
+-#define BUFFER_INIT(op,fd,buf,len) { (buf), 0, (len), (fd), (op) }
++#define BUFFER_INIT(op,fd,buf,len) { (buf), 0, (len), (fd), (long(*)())(op) }
+ #define BUFFER_INSIZE 8192
+ #define BUFFER_OUTSIZE 8192
+
+-extern void buffer_init(buffer *,int (*)(),int,char *,unsigned int);
++extern void buffer_init(buffer *,ssize_t (*)(),int,char *,unsigned int);
+
+ extern int buffer_flush(buffer *);
+ extern int buffer_put(buffer *,char *,unsigned int);
+diff -Naur a/buffer_put.c b/buffer_put.c
+--- a/buffer_put.c 2024-03-02 22:40:29.336632203 +0300
++++ b/buffer_put.c 2024-03-02 22:44:23.280441964 +0300
+@@ -3,9 +3,9 @@
+ #include "byte.h"
+ #include "error.h"
+
+-static int allwrite(int (*op)(),int fd,char *buf,unsigned int len)
++static int allwrite(long int (*op)(),int fd,char *buf,unsigned int len)
+ {
+- int w;
++ long int w;
+
+ while (len) {
+ w = op(fd,buf,len);
+diff -Naur a/cdb.c b/cdb.c
+--- a/cdb.c 2024-03-02 22:40:29.333298910 +0300
++++ b/cdb.c 2024-03-02 22:44:23.280441964 +0300
+@@ -3,7 +3,6 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/mman.h>
+-#include "readwrite.h"
+ #include "error.h"
+ #include "seek.h"
+ #include "byte.h"
+diff -Naur a/cdbdump.c b/cdbdump.c
+--- a/cdbdump.c 2024-03-02 22:40:29.333298910 +0300
++++ b/cdbdump.c 2024-03-02 22:44:23.280441964 +0300
+@@ -58,7 +58,7 @@
+
+ char strnum[FMT_ULONG];
+
+-main()
++void main()
+ {
+ uint32 eod;
+ uint32 klen;
+diff -Naur a/cdbget.c b/cdbget.c
+--- a/cdbget.c 2024-03-02 22:40:29.333298910 +0300
++++ b/cdbget.c 2024-03-02 22:44:23.280441964 +0300
+@@ -23,7 +23,7 @@
+ static struct cdb c;
+ char buf[1024];
+
+-main(int argc,char **argv)
++void main(int argc,char **argv)
+ {
+ char *key;
+ int r;
+diff -Naur a/cdb.h b/cdb.h
+--- a/cdb.h 2024-03-02 22:40:29.333298910 +0300
++++ b/cdb.h 2024-03-02 22:44:23.280441964 +0300
+@@ -3,6 +3,7 @@
+ #ifndef CDB_H
+ #define CDB_H
+
++#include <unistd.h>
+ #include "uint32.h"
+
+ #define CDB_HASHSTART 5381
+diff -Naur a/cdb_make.c b/cdb_make.c
+--- a/cdb_make.c 2024-03-02 22:40:29.333298910 +0300
++++ b/cdb_make.c 2024-03-02 22:44:23.283775257 +0300
+@@ -1,6 +1,5 @@
+ /* Public domain. */
+
+-#include "readwrite.h"
+ #include "seek.h"
+ #include "error.h"
+ #include "alloc.h"
+diff -Naur a/cdbmake.c b/cdbmake.c
+--- a/cdbmake.c 2024-03-02 22:40:29.333298910 +0300
++++ b/cdbmake.c 2024-03-02 22:44:23.283775257 +0300
+@@ -36,7 +36,7 @@
+
+ static struct cdb_make c;
+
+-main(int argc,char **argv)
++void main(int argc,char **argv)
+ {
+ unsigned int klen;
+ unsigned int dlen;
+diff -Naur a/cdb_make.h b/cdb_make.h
+--- a/cdb_make.h 2024-03-02 22:40:29.333298910 +0300
++++ b/cdb_make.h 2024-03-02 22:44:23.283775257 +0300
+@@ -3,6 +3,7 @@
+ #ifndef CDB_MAKE_H
+ #define CDB_MAKE_H
+
++#include <stdio.h>
+ #include "buffer.h"
+ #include "uint32.h"
+
+diff -Naur a/cdbstats.c b/cdbstats.c
+--- a/cdbstats.c 2024-03-02 22:40:29.333298910 +0300
++++ b/cdbstats.c 2024-03-02 22:44:23.283775257 +0300
+@@ -3,6 +3,7 @@
+ #include "buffer.h"
+ #include "strerr.h"
+ #include "seek.h"
++#include "str.h"
+ #include "cdb.h"
+
+ #define FATAL "cdbstats: fatal: "
+@@ -68,7 +69,7 @@
+ static unsigned long numrecords;
+ static unsigned long numd[11];
+
+-main()
++void main()
+ {
+ uint32 eod;
+ uint32 klen;
+diff -Naur a/cdbtest.c b/cdbtest.c
+--- a/cdbtest.c 2024-03-02 22:40:29.333298910 +0300
++++ b/cdbtest.c 2024-03-02 22:44:23.283775257 +0300
+@@ -3,6 +3,7 @@
+ #include "buffer.h"
+ #include "strerr.h"
+ #include "seek.h"
++#include "str.h"
+ #include "cdb.h"
+
+ #define FATAL "cdbtest: fatal: "
+@@ -66,7 +67,7 @@
+
+ static struct cdb c;
+
+-main()
++void main()
+ {
+ uint32 eod;
+ uint32 klen;
+diff -Naur a/FILES b/FILES
+--- a/FILES 2024-03-02 22:40:29.333298910 +0300
++++ b/FILES 2024-03-02 22:44:23.283775257 +0300
+@@ -55,12 +55,12 @@
+ fmt.h
+ fmt_ulong.c
+ hier.c
++hier.h
+ install.c
+ instcheck.c
+ open.h
+ open_read.c
+ open_trunc.c
+-readwrite.h
+ scan.h
+ scan_ulong.c
+ seek.h
+diff -Naur a/hier.c b/hier.c
+--- a/hier.c 2024-03-02 22:40:29.336632203 +0300
++++ b/hier.c 2024-03-02 22:44:23.283775257 +0300
+@@ -1,4 +1,5 @@
+ #include "auto_home.h"
++#include "hier.h"
+
+ void hier()
+ {
+diff -Naur a/hier.h b/hier.h
+--- a/hier.h 1970-01-01 03:00:00.000000000 +0300
++++ b/hier.h 2024-03-02 22:44:23.283775257 +0300
+@@ -0,0 +1,8 @@
++#ifndef HIER_H
++#define HIER_H
++
++void h(char *home,int uid,int gid,int mode);
++void d(char *home,char *subdir,int uid,int gid,int mode);
++void c(char *home,char *subdir,char *file,int uid,int gid,int mode);
++
++#endif
+diff -Naur a/install.c b/install.c
+--- a/install.c 2024-03-02 22:40:29.336632203 +0300
++++ b/install.c 2024-03-02 22:44:23.283775257 +0300
+@@ -1,8 +1,8 @@
++#include <sys/stat.h>
+ #include "buffer.h"
+ #include "strerr.h"
+ #include "error.h"
+ #include "open.h"
+-#include "readwrite.h"
+ #include "exit.h"
+
+ extern void hier();
+@@ -137,7 +137,7 @@
+ strerr_die6sys(111,FATAL,"unable to chmod .../",subdir,"/",file,": ");
+ }
+
+-main()
++void main()
+ {
+ fdsourcedir = open_read(".");
+ if (fdsourcedir == -1)
+diff -Naur a/instcheck.c b/instcheck.c
+--- a/instcheck.c 2024-03-02 22:40:29.336632203 +0300
++++ b/instcheck.c 2024-03-02 22:44:23.283775257 +0300
+@@ -1,8 +1,8 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <unistd.h>
+ #include "strerr.h"
+ #include "error.h"
+-#include "readwrite.h"
+ #include "exit.h"
+
+ extern void hier();
+@@ -101,7 +101,7 @@
+ perm("",home,"/",file,S_IFREG,uid,gid,mode);
+ }
+
+-main()
++void main()
+ {
+ hier();
+ _exit(0);
+diff -Naur a/Makefile b/Makefile
+--- a/Makefile 2024-03-02 22:40:29.333298910 +0300
++++ b/Makefile 2024-03-02 22:44:23.300441719 +0300
+@@ -17,7 +17,7 @@
+ ./load auto-str buffer.a unix.a byte.a
+
+ auto-str.o: \
+-compile auto-str.c buffer.h readwrite.h exit.h
++compile auto-str.c buffer.h exit.h
+ ./compile auto-str.c
+
+ auto_home.c: \
+@@ -40,19 +40,19 @@
+ ./compile buffer.c
+
+ buffer_0.o: \
+-compile buffer_0.c readwrite.h buffer.h
++compile buffer_0.c buffer.h
+ ./compile buffer_0.c
+
+ buffer_1.o: \
+-compile buffer_1.c readwrite.h buffer.h
++compile buffer_1.c buffer.h
+ ./compile buffer_1.c
+
+ buffer_1s.o: \
+-compile buffer_1s.c readwrite.h buffer.h
++compile buffer_1s.c buffer.h
+ ./compile buffer_1s.c
+
+ buffer_2.o: \
+-compile buffer_2.c readwrite.h buffer.h
++compile buffer_2.c buffer.h
+ ./compile buffer_2.c
+
+ buffer_copy.o: \
+@@ -91,7 +91,7 @@
+ ./makelib cdb.a cdb.o cdb_hash.o cdb_make.o
+
+ cdb.o: \
+-compile cdb.c readwrite.h error.h seek.h byte.h cdb.h uint32.h
++compile cdb.c error.h seek.h byte.h cdb.h uint32.h
+ ./compile cdb.c
+
+ cdb_hash.o: \
+@@ -99,7 +99,7 @@
+ ./compile cdb_hash.c
+
+ cdb_make.o: \
+-compile cdb_make.c readwrite.h seek.h error.h alloc.h cdb.h uint32.h \
++compile cdb_make.c seek.h error.h alloc.h cdb.h uint32.h \
+ cdb_make.h buffer.h uint32.h
+ ./compile cdb_make.c
+
+@@ -184,7 +184,7 @@
+ ./compile fmt_ulong.c
+
+ hier.o: \
+-compile hier.c auto_home.h
++compile hier.c hier.h auto_home.h
+ ./compile hier.c
+
+ install: \
+@@ -192,7 +192,7 @@
+ ./load install hier.o auto_home.o buffer.a unix.a byte.a
+
+ install.o: \
+-compile install.c buffer.h strerr.h error.h open.h readwrite.h exit.h
++compile install.c buffer.h strerr.h error.h open.h exit.h
+ ./compile install.c
+
+ instcheck: \
+@@ -200,7 +200,7 @@
+ ./load instcheck hier.o auto_home.o buffer.a unix.a byte.a
+
+ instcheck.o: \
+-compile instcheck.c strerr.h error.h readwrite.h exit.h
++compile instcheck.c strerr.h error.h exit.h
+ ./compile instcheck.c
+
+ it: \
+diff -Naur a/readwrite.h b/readwrite.h
+--- a/readwrite.h 2024-03-02 22:40:29.336632203 +0300
++++ b/readwrite.h 1970-01-01 03:00:00.000000000 +0300
+@@ -1,7 +0,0 @@
+-#ifndef READWRITE_H
+-#define READWRITE_H
+-
+-extern int read();
+-extern int write();
+-
+-#endif
+diff -Naur a/seek.h b/seek.h
+--- a/seek.h 2024-03-02 22:40:29.336632203 +0300
++++ b/seek.h 2024-03-02 22:44:23.300441719 +0300
+@@ -1,6 +1,8 @@
+ #ifndef SEEK_H
+ #define SEEK_H
+
++#include <unistd.h>
++
+ typedef unsigned long seek_pos;
+
+ extern seek_pos seek_cur(int);
+diff -Naur a/testzero.c b/testzero.c
+--- a/testzero.c 2024-03-02 22:40:29.333298910 +0300
++++ b/testzero.c 2024-03-02 22:44:23.300441719 +0300
+@@ -14,7 +14,7 @@
+ static char data[65536];
+ struct cdb_make c;
+
+-main(int argc,char **argv)
++void main(int argc,char **argv)
+ {
+ int fd;
+ unsigned long loop;
diff --git a/dev-db/cdb/files/cdb-make-type.patch b/dev-db/cdb/files/cdb-make-type.patch
new file mode 100644
index 000000000000..574c62851fb8
--- /dev/null
+++ b/dev-db/cdb/files/cdb-make-type.patch
@@ -0,0 +1,119 @@
+fixes all warnings below, because they annoyed me
+return type of 'main' is not 'int' [-Wmain-return-type]
+diff '--color=auto' -ru a/auto-str.c b/auto-str.c
+--- a/auto-str.c 2024-06-28 09:58:21.705876043 -0000
++++ b/auto-str.c 2024-06-28 09:58:28.913833538 -0000
+@@ -11,7 +11,7 @@
+ if (buffer_puts(&ss1,s) == -1) _exit(111);
+ }
+
+-void main(argc,argv)
++int main(argc,argv)
+ int argc;
+ char **argv;
+ {
+diff '--color=auto' -ru a/cdbdump.c b/cdbdump.c
+--- a/cdbdump.c 2024-06-28 09:58:21.706876037 -0000
++++ b/cdbdump.c 2024-06-28 09:58:28.901833608 -0000
+@@ -58,7 +58,7 @@
+
+ char strnum[FMT_ULONG];
+
+-void main()
++int main()
+ {
+ uint32_t eod;
+ uint32_t klen;
+diff '--color=auto' -ru a/cdbget.c b/cdbget.c
+--- a/cdbget.c 2024-06-28 09:58:21.711876007 -0000
++++ b/cdbget.c 2024-06-28 09:58:28.898833626 -0000
+@@ -23,7 +23,7 @@
+ static struct cdb c;
+ char buf[1024];
+
+-void main(int argc,char **argv)
++int main(int argc,char **argv)
+ {
+ char *key;
+ int r;
+diff '--color=auto' -ru a/cdbmake.c b/cdbmake.c
+--- a/cdbmake.c 2024-06-28 09:58:21.716875978 -0000
++++ b/cdbmake.c 2024-06-28 09:58:28.900833614 -0000
+@@ -36,7 +36,7 @@
+
+ static struct cdb_make c;
+
+-void main(int argc,char **argv)
++int main(int argc,char **argv)
+ {
+ unsigned int klen;
+ unsigned int dlen;
+diff '--color=auto' -ru a/cdbstats.c b/cdbstats.c
+--- a/cdbstats.c 2024-06-28 09:58:21.718875966 -0000
++++ b/cdbstats.c 2024-06-28 09:58:28.903833597 -0000
+@@ -69,7 +69,7 @@
+ static unsigned long numrecords;
+ static unsigned long numd[11];
+
+-void main()
++int main()
+ {
+ uint32_t eod;
+ uint32_t klen;
+diff '--color=auto' -ru a/cdbtest.c b/cdbtest.c
+--- a/cdbtest.c 2024-06-28 09:58:21.718875966 -0000
++++ b/cdbtest.c 2024-06-28 09:58:28.904833591 -0000
+@@ -67,7 +67,7 @@
+
+ static struct cdb c;
+
+-void main()
++int main()
+ {
+ uint32_t eod;
+ uint32_t klen;
+diff '--color=auto' -ru a/install.c b/install.c
+--- a/install.c 2024-06-28 09:58:21.719875960 -0000
++++ b/install.c 2024-06-28 09:58:28.928833449 -0000
+@@ -137,7 +137,7 @@
+ strerr_die6sys(111,FATAL,"unable to chmod .../",subdir,"/",file,": ");
+ }
+
+-void main()
++int main()
+ {
+ fdsourcedir = open_read(".");
+ if (fdsourcedir == -1)
+diff '--color=auto' -ru a/instcheck.c b/instcheck.c
+--- a/instcheck.c 2024-06-28 09:58:21.719875960 -0000
++++ b/instcheck.c 2024-06-28 09:58:28.929833443 -0000
+@@ -101,7 +101,7 @@
+ perm("",home,"/",file,S_IFREG,uid,gid,mode);
+ }
+
+-void main()
++int main()
+ {
+ hier();
+ _exit(0);
+diff '--color=auto' -ru a/testzero.c b/testzero.c
+--- a/testzero.c 2024-06-28 09:58:21.720875954 -0000
++++ b/testzero.c 2024-06-28 09:58:28.908833567 -0000
+@@ -14,7 +14,7 @@
+ static char data[65536];
+ struct cdb_make c;
+
+-void main(int argc,char **argv)
++int main(int argc,char **argv)
+ {
+ int fd;
+ unsigned long loop;
+diff '--color=auto' -ru a/tryulong32.c b/tryulong32.c
+--- a/tryulong32.c 2024-06-28 09:58:21.715875984 -0000
++++ b/tryulong32.c 2024-06-28 09:58:28.936833402 -0000
+@@ -1,4 +1,4 @@
+-void main()
++int main()
+ {
+ unsigned long u;
+ u = 1;