* updated firefox (133.0.3 -> 134.0.2)
[t2sde.git] / package / boot / efivar / lfs64.patch.musl
blobdcba9ef3fef10e6d24f412ef73114dd91c0e343c
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/efivar/lfs64.patch.musl
3 # Copyright (C) 2023 The T2 SDE Project
4
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
7
8 # This patch file is dual-licensed. It is available under the license the
9 # patched project is licensed under, as long as it is an OpenSource license
10 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
11 # of the GNU General Public License version 2 as used by the T2 SDE.
12 # --- T2-COPYRIGHT-NOTE-END ---
14 Patch-Source: https://github.com/rhboot/efivar/commit/914c686cc54b2405dab08bff77cd60827aab54b1
16 From 914c686cc54b2405dab08bff77cd60827aab54b1 Mon Sep 17 00:00:00 2001
17 From: Khem Raj <raj.khem@gmail.com>
18 Date: Wed, 14 Dec 2022 16:55:51 -0800
19 Subject: [PATCH] Use off_t instead of off64_t
21 Pass _FILE_OFFSET_BITS=64 to ensure 64bit off_t
23 This helps building efivar for 32bit arches on systems using musl C
24 library. It works with glibc since _GNU_SOURCE defines
25 _LARGEFILE64_SOURCE as well, this feature test macro enables the 64bit
26 interfaces which were done as intermediate steps when transition to
27 66-bit off_t was done as part olf LFS64 support.
29 Signed-off-by: Khem Raj <raj.khem@gmail.com>
30 ---
31  src/error.c             | 2 +-
32  src/include/defaults.mk | 1 +
33  2 files changed, 2 insertions(+), 1 deletion(-)
35 diff --git a/src/error.c b/src/error.c
36 index fcbba0d6..9530e22c 100644
37 --- a/src/error.c
38 +++ b/src/error.c
39 @@ -191,7 +191,7 @@ dbglog_write(void *cookie, const char *buf, size_t size)
40  }
42  static int
43 -dbglog_seek(void *cookie UNUSED, off64_t *offset, int whence)
44 +dbglog_seek(void *cookie UNUSED, off_t *offset, int whence)
45  {
46         FILE *log = efi_errlog ? efi_errlog : stderr;
47         int rc;
48 diff --git a/src/include/defaults.mk b/src/include/defaults.mk
49 index 42bd3d6e..bb9c997f 100644
50 --- a/src/include/defaults.mk
51 +++ b/src/include/defaults.mk
52 @@ -34,6 +34,7 @@ CPPFLAGS ?=
53  override _CPPFLAGS := $(CPPFLAGS)
54  override CPPFLAGS = $(_CPPFLAGS) -DLIBEFIVAR_VERSION=$(VERSION) \
55             -D_GNU_SOURCE \
56 +           -D_FILE_OFFSET_BITS=64 \
57             -I$(TOPDIR)/src/include/
58  CFLAGS ?= $(OPTIMIZE) $(DEBUGINFO) $(WARNINGS) $(ERRORS)
59  CFLAGS_GCC ?= -specs=$(TOPDIR)/src/include/gcc.specs \