aboutsummaryrefslogtreecommitdiffstats
path: root/main/kbd/0002-Fix-required-header-includes.patch
blob: dff221ecef76d23122ed3f04e8b26b59f8f56894 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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
--- a/src/kbdrate.c
+++ b/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
--- a/src/openvt.c
+++ b/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