Skip to content

Commit

Permalink
app-containers/lxd: Fix build with musl 1.2.4
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/905996
Signed-off-by: Violet Purcell <vimproved@inventati.org>
  • Loading branch information
vimproved committed Jul 15, 2023
1 parent c223ba8 commit c4c349f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
17 changes: 17 additions & 0 deletions app-containers/lxd/files/lxd-5.0.2-fix-build-with-musl-1.2.4.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
From https://github.com/mattn/go-sqlite3/pull/1177/commits/65d6085c5d87280c0d6883c884ddb25f9273942f Mon Sep 17 00:00:00 2001
From: leso-kn <info@lesosoftware.com>
Date: Mon, 10 Jul 2023 14:58:52 +0200
Subject: [PATCH] Fix musl build (#1164)

--- a/vendor/github.com/mattn/go-sqlite3/sqlite3.go
+++ b/vendor/github.com/mattn/go-sqlite3/sqlite3.go
@@ -21,7 +21,7 @@ package sqlite3
#cgo CFLAGS: -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1
#cgo CFLAGS: -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
#cgo CFLAGS: -Wno-deprecated-declarations
-#cgo linux,!android CFLAGS: -DHAVE_PREAD64=1 -DHAVE_PWRITE64=1
+#cgo linux,!android CFLAGS: -DHAVE_PREAD=1 -DHAVE_PWRITE=1
#cgo openbsd CFLAGS: -I/usr/local/include
#cgo openbsd LDFLAGS: -L/usr/local/lib
#ifndef USE_LIBSQLITE3

Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ RESTRICT="test"

GOPATH="${S}/_dist"

PATCHES=( "${FILESDIR}"/lxd-4.0.9-glibc-2.36-fix.patch )
PATCHES=( "${FILESDIR}"/lxd-4.0.9-glibc-2.36-fix.patch
"${FILESDIR}"/lxd-5.0.2-fix-build-with-musl-1.2.4.patch )

src_prepare() {
export GOPATH="${S}/_dist"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ RESTRICT="test"
GOPATH="${S}/_dist"

PATCHES=( "${FILESDIR}"/lxd-5.0.2-remove-shellcheck-buildsystem-checks.patch
"${FILESDIR}"/lxd-5.0.3-btrfs-quota-group-fix.patch )
"${FILESDIR}"/lxd-5.0.3-btrfs-quota-group-fix.patch
"${FILESDIR}"/lxd-5.0.2-fix-build-with-musl-1.2.4.patch )

src_prepare() {
export GOPATH="${S}/_dist"
Expand Down

0 comments on commit c4c349f

Please sign in to comment.