void-packages/srcpkgs/kbd/patches/0002-Fix-required-header-in...

43 lines
1.0 KiB
Diff

From b856e52cd6e76a105aad8ddfcd2b123203b687c1 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Wed, 20 Aug 2014 08:47:50 +0200
Subject: [PATCH 2/4] Fix required header includes
We need fcntl.h for open(2) and limits.h for NAME_MAX for compiling
with musl libc.
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
---
src/kbdrate.c | 1 +
src/openvt.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/src/kbdrate.c b/src/kbdrate.c
index 2ab8388..aa66622 100644
--- src/kbdrate.c
+++ src/kbdrate.c
@@ -72,6 +72,7 @@ beats rebuilding the kernel!
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
+#include <fcntl.h>
#include <sys/file.h>
#include <sys/ioctl.h>
#include <linux/kd.h>
diff --git a/src/openvt.c b/src/openvt.c
index 075136f..70d37d8 100644
--- src/openvt.c
+++ src/openvt.c
@@ -5,6 +5,8 @@
#include <dirent.h>
#include <pwd.h>
#include <errno.h>
+#include <fcntl.h>
+#include <limits.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/vt.h>
--
2.1.0