All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] mariadb: Alias lseek64/open64/ftruncate64 on musl systems
@ 2022-12-26  3:25 Khem Raj
  0 siblings, 0 replies; only message in thread
From: Khem Raj @ 2022-12-26  3:25 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

This ensures it can keep building with newer musl

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-oe/recipes-dbs/mysql/mariadb.inc         |  1 +
 meta-oe/recipes-dbs/mysql/mariadb/lfs64.patch | 19 +++++++++++++++++++
 2 files changed, 20 insertions(+)
 create mode 100644 meta-oe/recipes-dbs/mysql/mariadb/lfs64.patch

diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-oe/recipes-dbs/mysql/mariadb.inc
index 1a7cce2ea1..4e285aea7e 100644
--- a/meta-oe/recipes-dbs/mysql/mariadb.inc
+++ b/meta-oe/recipes-dbs/mysql/mariadb.inc
@@ -21,6 +21,7 @@ SRC_URI = "https://archive.mariadb.org/${BP}/source/${BP}.tar.gz \
            file://sys_futex.patch \
            file://cross-compiling.patch \
            file://0001-sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch \
+           file://lfs64.patch \
           "
 SRC_URI:append:libc-musl = " file://ppc-remove-glibc-dep.patch"
 SRC_URI[sha256sum] = "ffacf84e74daf249ad64b9573d79a4e882f66b004614f8b33bfcb14a8e25da1d"
diff --git a/meta-oe/recipes-dbs/mysql/mariadb/lfs64.patch b/meta-oe/recipes-dbs/mysql/mariadb/lfs64.patch
new file mode 100644
index 0000000000..9867908c6c
--- /dev/null
+++ b/meta-oe/recipes-dbs/mysql/mariadb/lfs64.patch
@@ -0,0 +1,19 @@
+--- a/storage/connect/os.h
++++ b/storage/connect/os.h
+@@ -2,13 +2,15 @@
+ #ifndef _OS_H_INCLUDED
+ #define _OS_H_INCLUDED
+ 
+-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__)
++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__) || (defined(__linux__) && !defined(__GLIBC__))
+ typedef off_t off64_t;
+ #define lseek64(fd, offset, whence) lseek((fd), (offset), (whence))
+ #define open64(path, flags, mode)   open((path), (flags), (mode))
+ #define ftruncate64(fd, length)     ftruncate((fd), (length))
++#ifndef O_LARGEFILE
+ #define O_LARGEFILE 0
+ #endif
++#endif
+ 
+ #ifdef _AIX
+ #ifndef O_LARGEFILE
-- 
2.39.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-26  3:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-26  3:25 [meta-oe][PATCH] mariadb: Alias lseek64/open64/ftruncate64 on musl systems Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.