parent
0a4a5192b4
commit
1e0565cd1d
3 changed files with 4 additions and 124 deletions
|
@ -1,92 +0,0 @@
|
|||
From 4c61d59e9c85e26cee306ed1b964030c1e862e00 Mon Sep 17 00:00:00 2001
|
||||
From: Natanael Copa <ncopa@alpinelinux.org>
|
||||
Date: Wed, 20 Aug 2014 08:44:41 +0200
|
||||
Subject: [PATCH 1/4] Replace u_short with unsigned short
|
||||
|
||||
u_short is non-standard and causes build failure with musl libc.
|
||||
|
||||
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
|
||||
---
|
||||
src/libkeymap/dump.c | 6 +++---
|
||||
src/libkeymap/kmap.c | 6 +++---
|
||||
src/libkeymap/summary.c | 2 +-
|
||||
3 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/libkeymap/dump.c b/src/libkeymap/dump.c
|
||||
index 0262e24..e0c502e 100644
|
||||
--- src/libkeymap/dump.c
|
||||
+++ src/libkeymap/dump.c
|
||||
@@ -69,7 +69,7 @@ lk_dump_bkeymap(struct lk_ctx *ctx, FILE *fd)
|
||||
continue;
|
||||
|
||||
for (j = 0; j < NR_KEYS / 2; j++) {
|
||||
- u_short v;
|
||||
+ unsigned short v;
|
||||
v = lk_get_key(ctx, i, j);
|
||||
|
||||
if (fwrite(&v, sizeof(v), 1, fd) != 1)
|
||||
@@ -130,7 +130,7 @@ lk_dump_ctable(struct lk_ctx *ctx, FILE *fd)
|
||||
if (lk_map_exists(ctx, i)) {
|
||||
if (i)
|
||||
fprintf(fd, "static ");
|
||||
- fprintf(fd, "u_short %s_map[NR_KEYS] = {", mk_mapname(i));
|
||||
+ fprintf(fd, "unsigned short %s_map[NR_KEYS] = {", mk_mapname(i));
|
||||
for (j = 0; j < NR_KEYS; j++) {
|
||||
if (!(j % 8))
|
||||
fprintf(fd, "\n");
|
||||
@@ -489,7 +489,7 @@ no_shorthands:
|
||||
|
||||
isasexpected = 0;
|
||||
if (isletter) {
|
||||
- u_short defs[16];
|
||||
+ unsigned short defs[16];
|
||||
defs[0] = K(KT_LETTER, val);
|
||||
defs[1] = K(KT_LETTER, val ^ 32);
|
||||
defs[2] = defs[0];
|
||||
diff --git a/src/libkeymap/kmap.c b/src/libkeymap/kmap.c
|
||||
index 67be81e..8b90654 100644
|
||||
--- src/libkeymap/kmap.c
|
||||
+++ src/libkeymap/kmap.c
|
||||
@@ -173,7 +173,7 @@ lk_add_key(struct lk_ctx *ctx, unsigned int k_table, unsigned int k_index, int k
|
||||
}
|
||||
|
||||
static int
|
||||
-do_constant_key(struct lk_ctx *ctx, int i, u_short key)
|
||||
+do_constant_key(struct lk_ctx *ctx, int i, unsigned short key)
|
||||
{
|
||||
int typ, val;
|
||||
unsigned int j;
|
||||
@@ -183,7 +183,7 @@ do_constant_key(struct lk_ctx *ctx, int i, u_short key)
|
||||
|
||||
if ((typ == KT_LATIN || typ == KT_LETTER) &&
|
||||
((val >= 'a' && val <= 'z') || (val >= 'A' && val <= 'Z'))) {
|
||||
- u_short defs[16];
|
||||
+ unsigned short defs[16];
|
||||
defs[0] = K(KT_LETTER, val);
|
||||
defs[1] = K(KT_LETTER, val ^ 32);
|
||||
defs[2] = defs[0];
|
||||
@@ -235,7 +235,7 @@ lk_add_constants(struct lk_ctx *ctx)
|
||||
|
||||
for (i = 0; i < ctx->key_constant->total; i++) {
|
||||
char *constant;
|
||||
- u_short key;
|
||||
+ unsigned short key;
|
||||
|
||||
constant = lk_array_get(ctx->key_constant, i);
|
||||
if (!constant || !(*constant))
|
||||
diff --git a/src/libkeymap/summary.c b/src/libkeymap/summary.c
|
||||
index 46df90d..44d4e5f 100644
|
||||
--- src/libkeymap/summary.c
|
||||
+++ src/libkeymap/summary.c
|
||||
@@ -30,7 +30,7 @@ valid_type(int fd, int t)
|
||||
return (ioctl(fd, KDSKBENT, (unsigned long) &ke) == 0);
|
||||
}
|
||||
|
||||
-static u_char
|
||||
+static unsigned char
|
||||
maximum_val(int fd, int t)
|
||||
{
|
||||
struct kbentry ke, ke0;
|
||||
--
|
||||
2.1.0
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
From 3c5c7acc7ef874b919b26583d3892e21b907833f Mon Sep 17 00:00:00 2001
|
||||
From: Natanael Copa <ncopa@alpinelinux.org>
|
||||
Date: Wed, 20 Aug 2014 09:00:03 +0200
|
||||
Subject: [PATCH 3/4] Only inluclude kernel headers with glibc
|
||||
|
||||
This fixes compile errors with musl libc
|
||||
|
||||
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
|
||||
---
|
||||
src/resizecons.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/resizecons.c b/src/resizecons.c
|
||||
index 5f84845..691dfcc 100644
|
||||
--- src/resizecons.c
|
||||
+++ src/resizecons.c
|
||||
@@ -80,7 +80,7 @@
|
||||
#include <sys/ioctl.h>
|
||||
#if (__GNU_LIBRARY__ >= 6)
|
||||
#include <sys/perm.h>
|
||||
-#else
|
||||
+#elif defined(__GLIBC__)
|
||||
#include <linux/types.h>
|
||||
#include <linux/termios.h>
|
||||
#endif
|
||||
--
|
||||
2.1.0
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'kbd'
|
||||
pkgname=kbd
|
||||
version=2.0.2
|
||||
revision=6
|
||||
version=2.0.3
|
||||
revision=1
|
||||
build_style=gnu-configure
|
||||
configure_args="--datadir=/usr/share/kbd --localedir=/usr/share/kbd/locale"
|
||||
hostmakedepends="automake libtool gettext-devel flex pkg-config"
|
||||
|
@ -11,8 +11,8 @@ short_desc="Linux keyboard utilities"
|
|||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||
license="GPL-2"
|
||||
homepage="http://www.kbd-project.org/"
|
||||
distfiles="http://www.kbd-project.org/download/kbd-${version}.tar.xz"
|
||||
checksum=9dfddabf96012e329c4bebb96a21aeef7c3872f624e96e8156ba542b82aeb912
|
||||
distfiles="${KERNEL_SITE}/utils/${pkgname}/${pkgname}-${version}.tar.xz"
|
||||
checksum=7a899de1c0eb75f3aea737095a736f2375e1cbfbe693fc14a3fe0bfb4649fb5e
|
||||
|
||||
pre_configure() {
|
||||
# Rename keymap files with the same names
|
||||
|
|
Loading…
Reference in a new issue