Backport an upstream patch to fix the build

https://github.com/flatpak/flatpak/pull/1914
This commit is contained in:
Kalev Lember 2018-07-20 13:24:01 +02:00
parent b849740f7b
commit 9b483e7baf
2 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,29 @@
From 7be25521cf639acc77ad8f968eb6c918533e94ec Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Wed, 11 Jul 2018 14:56:32 -0400
Subject: [PATCH] libglnx.m4: Include stdio.h for renameat2
glibc added it upstream:
https://sourceware.org/git/?p=glibc.git;a=commit;h=d6da5cb6a8e0e8a9ce92b7d951a254cf325248d7
But we need the right header.
Ref: https://github.com/flatpak/flatpak/issues/1890
---
libglnx.m4 | 1 +
1 file changed, 1 insertion(+)
diff --git a/libglnx/libglnx.m4 b/libglnx.m4
index 34caf20..5922805 100644
--- a/libglnx/libglnx.m4
+++ b/libglnx/libglnx.m4
@@ -7,6 +7,7 @@ AC_CHECK_DECLS([
[], [], [[
#include <sys/types.h>
#include <unistd.h>
+#include <stdio.h>
#include <sys/mount.h>
#include <fcntl.h>
#include <sched.h>
--
2.17.1

View File

@ -10,6 +10,9 @@ License: LGPLv2+
URL: http://flatpak.org/
Source0: https://github.com/flatpak/flatpak/releases/download/%{version}/%{name}-%{version}.tar.xz
# https://github.com/flatpak/flatpak/pull/1914
Patch0: 0001-libglnx.m4-Include-stdio.h-for-renameat2.patch
BuildRequires: pkgconfig(appstream-glib)
BuildRequires: pkgconfig(gio-unix-2.0)
BuildRequires: pkgconfig(gobject-introspection-1.0) >= 1.40.0
@ -31,6 +34,10 @@ BuildRequires: libcap-devel
BuildRequires: systemd
BuildRequires: /usr/bin/xmlto
BuildRequires: /usr/bin/xsltproc
# For patch0
BuildRequires: automake autoconf libtool
BuildRequires: gettext-devel
BuildRequires: gtk-doc
Requires: bubblewrap >= %{bubblewrap_version}
Requires: ostree-libs%{?_isa} >= %{ostree_version}
@ -69,6 +76,9 @@ This package contains libflatpak.
%build
# For patch0
autoreconf -fi
(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; CONFIGFLAGS=--enable-gtk-doc; fi;
# User namespace support is sufficient.
%configure --with-priv-mode=none \