summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-12-12 13:03:02 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-12-13 23:31:40 +0000
commit514a3548cf040fad4e3851cc344abdcb4aedab3a (patch)
treefdf84cb3e83f1fa4ee17dfeb8d88f4bd2ace6d1f /meta
parent6aa9011ab446b83496b4e682869bd000e69d45e4 (diff)
downloadpoky-514a3548cf040fad4e3851cc344abdcb4aedab3a.tar.gz
rpcsvc-proto: Use autoconf knob to enable largefile support
(From OE-Core rev: 30d4fd04ebabb4b6bb4436254bfc4a245ee43034) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/rpcsvc-proto/rpcsvc-proto.bb3
-rw-r--r--meta/recipes-extended/rpcsvc-proto/rpcsvc-proto/0001-Use-AC_SYS_LARGEFILE-macro-to-control-largefile-supp.patch80
2 files changed, 82 insertions, 1 deletions
diff --git a/meta/recipes-extended/rpcsvc-proto/rpcsvc-proto.bb b/meta/recipes-extended/rpcsvc-proto/rpcsvc-proto.bb
index dd7bd2b1be..00919a3d70 100644
--- a/meta/recipes-extended/rpcsvc-proto/rpcsvc-proto.bb
+++ b/meta/recipes-extended/rpcsvc-proto/rpcsvc-proto.bb
@@ -21,7 +21,8 @@ SRCREV = "71e0a12c04d130a78674ac6309eefffa6ecee612"
21 21
22SRC_URI = "git://github.com/thkukuk/${BPN};branch=master;protocol=https \ 22SRC_URI = "git://github.com/thkukuk/${BPN};branch=master;protocol=https \
23 file://0001-Use-cross-compiled-rpcgen.patch \ 23 file://0001-Use-cross-compiled-rpcgen.patch \
24 " 24 file://0001-Use-AC_SYS_LARGEFILE-macro-to-control-largefile-supp.patch \
25 "
25 26
26S = "${WORKDIR}/git" 27S = "${WORKDIR}/git"
27 28
diff --git a/meta/recipes-extended/rpcsvc-proto/rpcsvc-proto/0001-Use-AC_SYS_LARGEFILE-macro-to-control-largefile-supp.patch b/meta/recipes-extended/rpcsvc-proto/rpcsvc-proto/0001-Use-AC_SYS_LARGEFILE-macro-to-control-largefile-supp.patch
new file mode 100644
index 0000000000..f07866d55a
--- /dev/null
+++ b/meta/recipes-extended/rpcsvc-proto/rpcsvc-proto/0001-Use-AC_SYS_LARGEFILE-macro-to-control-largefile-supp.patch
@@ -0,0 +1,80 @@
1From 6820c53c3952f78185beb59f767c372fc745dcf3 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 11 Dec 2022 21:42:59 -0800
4Subject: [PATCH] Use AC_SYS_LARGEFILE macro to control largefile support
5
6The autoconf macro AC_SYS_LARGEFILE defines _FILE_OFFSET_BITS=64
7where necessary to ensure that off_t and all interfaces using off_t
8are 64bit, even on 32bit systems.
9
10replace stat64 by equivalent stat struct/func
11
12Upstream-Status: Accepted [https://github.com/thkukuk/rpcsvc-proto/pull/15]
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 configure.ac | 1 +
16 rpcgen/rpc_main.c | 16 +++++-----------
17 2 files changed, 6 insertions(+), 11 deletions(-)
18
19diff --git a/configure.ac b/configure.ac
20index bacc2fb..a9fc730 100644
21--- a/configure.ac
22+++ b/configure.ac
23@@ -8,6 +8,7 @@ AC_PREFIX_DEFAULT(/usr)
24 AC_SUBST(PACKAGE)
25 AC_SUBST(VERSION)
26
27+AC_SYS_LARGEFILE
28 AC_PROG_CC
29 AC_GNU_SOURCE
30 AM_PROG_CC_C_O
31diff --git a/rpcgen/rpc_main.c b/rpcgen/rpc_main.c
32index 277adc6..fd7dea9 100644
33--- a/rpcgen/rpc_main.c
34+++ b/rpcgen/rpc_main.c
35@@ -62,12 +62,6 @@
36 #define EXTEND 1 /* alias for TRUE */
37 #define DONT_EXTEND 0 /* alias for FALSE */
38
39-#ifdef __APPLE__
40-# if __DARWIN_ONLY_64_BIT_INO_T
41-# define stat64 stat
42-# endif
43-#endif
44-
45 struct commandline
46 {
47 int cflag; /* xdr C routines */
48@@ -337,9 +331,9 @@ clear_args (void)
49 static void
50 find_cpp (void)
51 {
52- struct stat64 buf;
53+ struct stat buf;
54
55- if (stat64 (CPP, &buf) == 0)
56+ if (stat (CPP, &buf) == 0)
57 return;
58
59 if (cppDefined) /* user specified cpp but it does not exist */
60@@ -1125,17 +1119,17 @@ putarg (int whereto, const char *cp)
61 static void
62 checkfiles (const char *infile, const char *outfile)
63 {
64- struct stat64 buf;
65+ struct stat buf;
66
67 if (infile) /* infile ! = NULL */
68- if (stat64 (infile, &buf) < 0)
69+ if (stat (infile, &buf) < 0)
70 {
71 perror (infile);
72 crash ();
73 }
74 if (outfile)
75 {
76- if (stat64 (outfile, &buf) < 0)
77+ if (stat (outfile, &buf) < 0)
78 return; /* file does not exist */
79 else
80 {