blob: 09a0c687b64d6ada0eb9035e81795f72afdb8a6c [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001From 00a456145531d194d3993c9f4cd404d5ca16c9df Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 6 Apr 2015 17:36:44 +0000
4Subject: [PATCH] quota: Fix build with musl
5
Patrick Williamsc124f4f2015-09-15 14:41:29 -05006Include fcntl.h to pacify compiler errors on musl
7like
8
9error: unknown type name 'loff_t'
10Cover rpc headers under proper conditional
11Dont use __P its undefined
12
13Upstream-Status: Pending
14
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16
Andrew Geissler517393d2023-01-13 08:55:19 -060017---
18 quotacheck.c | 1 +
19 quotaio.c | 1 +
20 rquota_client.c | 4 ++++
21 3 files changed, 6 insertions(+)
22
Brad Bishopc342db32019-05-15 21:57:59 -040023diff --git a/quotacheck.c b/quotacheck.c
Andrew Geissler517393d2023-01-13 08:55:19 -060024index bd62d9a..772a27d 100644
Brad Bishopc342db32019-05-15 21:57:59 -040025--- a/quotacheck.c
26+++ b/quotacheck.c
Patrick Williamsc124f4f2015-09-15 14:41:29 -050027@@ -19,6 +19,7 @@
28 #include <unistd.h>
29 #include <stdlib.h>
30 #include <errno.h>
31+#include <fcntl.h>
32
33 #include <sys/stat.h>
34 #include <sys/types.h>
Brad Bishopc342db32019-05-15 21:57:59 -040035diff --git a/quotaio.c b/quotaio.c
36index 94ae458..d57fc1a 100644
37--- a/quotaio.c
38+++ b/quotaio.c
Patrick Williamsc124f4f2015-09-15 14:41:29 -050039@@ -12,6 +12,7 @@
40 #include <string.h>
41 #include <unistd.h>
42 #include <stdlib.h>
43+#include <fcntl.h>
44 #include <sys/types.h>
45 #include <sys/stat.h>
46 #include <sys/file.h>
Brad Bishopc342db32019-05-15 21:57:59 -040047diff --git a/rquota_client.c b/rquota_client.c
Andrew Geissler517393d2023-01-13 08:55:19 -060048index 7f8e821..d48505a 100644
Brad Bishopc342db32019-05-15 21:57:59 -040049--- a/rquota_client.c
50+++ b/rquota_client.c
Patrick Williamsc124f4f2015-09-15 14:41:29 -050051@@ -19,7 +19,9 @@
52
53 #include "config.h"
54
55+#if defined(RPC)
56 #include <rpc/rpc.h>
57+#endif
58 #include <sys/types.h>
59 #include <sys/param.h>
60 #include <sys/stat.h>
61@@ -35,7 +37,9 @@
62 #include <stdint.h>
63
64 #include "mntopt.h"
65+#if defined(RPC)
66 #include "rquota.h"
67+#endif
68 #include "common.h"
69 #include "quotaio.h"
70 #include "quotasys.h"