summaryrefslogtreecommitdiffstats
path: root/libraries/libbsd/patches/0001-funopen-Replace-off64_t-with-off_t-in-funopen_seek.patch
blob: 6a9892acdaba0220adcd00fcc5c94fdf8d14c4c7 (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
From ec88b7bbbc9ef262b22302419ae14fce5fc7b1d8 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 15 Dec 2022 09:02:22 -0800
Origin: upstream, commit:ec88b7bbbc9ef262b22302419ae14fce5fc7b1d8
Subject: [PATCH] funopen: Replace off64_t with off_t in funopen_seek()

AC_SYS_LARGEFILE in configure.ac is setting needed defines to make
64bit off_t on relevant platforms.

Fixes build on musl:

| src/funopen.c:68:28: error: unknown type name 'off64_t'; did you mean 'off_t'?
| funopen_seek(void *cookie, off64_t *offset, int whence)
|                            ^~~~~~~
|                            off_t

Closes: !24
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Guillem Jover <guillem@hadrons.org>
---
 src/funopen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/funopen.c b/src/funopen.c
index 01b63b3..0513e38 100644
--- a/src/funopen.c
+++ b/src/funopen.c
@@ -65,7 +65,7 @@ funopen_write(void *cookie, const char *buf, size_t size)
 }
 
 static int
-funopen_seek(void *cookie, off64_t *offset, int whence)
+funopen_seek(void *cookie, off_t *offset, int whence)
 {
 	struct funopen_cookie *cookiewrap = cookie;
 	off_t soff = *offset;
-- 
2.39.2