]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
rpcsvc-proto: Use autoconf knob to enable largefile support
authorKhem Raj <raj.khem@gmail.com>
Mon, 12 Dec 2022 21:03:02 +0000 (13:03 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 13 Dec 2022 23:31:38 +0000 (23:31 +0000)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
meta/recipes-extended/rpcsvc-proto/rpcsvc-proto.bb
meta/recipes-extended/rpcsvc-proto/rpcsvc-proto/0001-Use-AC_SYS_LARGEFILE-macro-to-control-largefile-supp.patch [new file with mode: 0644]

index dd7bd2b1be465132fae06948fba1e202dd296c1b..00919a3d70ece6647619fe8b598a1667335fd4f6 100644 (file)
@@ -21,7 +21,8 @@ SRCREV = "71e0a12c04d130a78674ac6309eefffa6ecee612"
 
 SRC_URI = "git://github.com/thkukuk/${BPN};branch=master;protocol=https \
            file://0001-Use-cross-compiled-rpcgen.patch \
-          "
+           file://0001-Use-AC_SYS_LARGEFILE-macro-to-control-largefile-supp.patch \
+           "
 
 S = "${WORKDIR}/git"
 
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 (file)
index 0000000..f07866d
--- /dev/null
@@ -0,0 +1,80 @@
+From 6820c53c3952f78185beb59f767c372fc745dcf3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 11 Dec 2022 21:42:59 -0800
+Subject: [PATCH] Use AC_SYS_LARGEFILE macro to control largefile support
+
+The autoconf macro AC_SYS_LARGEFILE defines _FILE_OFFSET_BITS=64
+where necessary to ensure that off_t and all interfaces using off_t
+are 64bit, even on 32bit systems.
+
+replace stat64 by equivalent stat struct/func
+
+Upstream-Status: Accepted [https://github.com/thkukuk/rpcsvc-proto/pull/15]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac      |  1 +
+ rpcgen/rpc_main.c | 16 +++++-----------
+ 2 files changed, 6 insertions(+), 11 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index bacc2fb..a9fc730 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -8,6 +8,7 @@ AC_PREFIX_DEFAULT(/usr)
+ AC_SUBST(PACKAGE)
+ AC_SUBST(VERSION)
++AC_SYS_LARGEFILE
+ AC_PROG_CC
+ AC_GNU_SOURCE
+ AM_PROG_CC_C_O
+diff --git a/rpcgen/rpc_main.c b/rpcgen/rpc_main.c
+index 277adc6..fd7dea9 100644
+--- a/rpcgen/rpc_main.c
++++ b/rpcgen/rpc_main.c
+@@ -62,12 +62,6 @@
+ #define EXTEND        1               /* alias for TRUE */
+ #define DONT_EXTEND   0       /* alias for FALSE */
+-#ifdef __APPLE__
+-# if __DARWIN_ONLY_64_BIT_INO_T
+-#  define stat64 stat
+-# endif
+-#endif
+-
+ struct commandline
+   {
+     int cflag;                        /* xdr C routines */
+@@ -337,9 +331,9 @@ clear_args (void)
+ static void
+ find_cpp (void)
+ {
+-  struct stat64 buf;
++  struct stat buf;
+-  if (stat64 (CPP, &buf) == 0)
++  if (stat (CPP, &buf) == 0)
+     return;
+   if (cppDefined) /* user specified cpp but it does not exist */
+@@ -1125,17 +1119,17 @@ putarg (int whereto, const char *cp)
+ static void
+ checkfiles (const char *infile, const char *outfile)
+ {
+-  struct stat64 buf;
++  struct stat buf;
+   if (infile)                 /* infile ! = NULL */
+-    if (stat64 (infile, &buf) < 0)
++    if (stat (infile, &buf) < 0)
+       {
+       perror (infile);
+       crash ();
+       }
+   if (outfile)
+     {
+-      if (stat64 (outfile, &buf) < 0)
++      if (stat (outfile, &buf) < 0)
+       return;                 /* file does not exist */
+       else
+       {