diff options
-rw-r--r-- | pcr/elogind/PKGBUILD | 10 | ||||
-rw-r--r-- | pcr/elogind/elogind-struct-statx-is-defined.patch | 50 |
2 files changed, 57 insertions, 3 deletions
diff --git a/pcr/elogind/PKGBUILD b/pcr/elogind/PKGBUILD index 4b399cfa3..9ae5b38d1 100644 --- a/pcr/elogind/PKGBUILD +++ b/pcr/elogind/PKGBUILD @@ -11,7 +11,7 @@ pkgbase=elogind pkgname=('elogind' 'libelogind' 'libelogind-manpages') pkgver=238.1.0 _commit='8bb4695ef79404b6731b20dee58115c313444754' -pkgrel=2 +pkgrel=2.1 pkgdesc="The systemd project's logind, extracted to a standalone package" arch=('i686' 'x86_64' 'armv7h') url="https://github.com/elogind/elogind" @@ -20,8 +20,10 @@ makedepends=('acl' 'docbook-xsl' 'gperf' 'pam' 'libcap' 'polkit' 'dbus' 'udev' 'meson' 'git') validpgpkeys=('0C4DF110D49D911C593050BF5FC1DF9CEC74BA48') # Sven Eden <seden@havi.de> source=(# fragment is latest tag for source verification, final merge in prepare() - "git+https://github.com/elogind/elogind#tag=v${pkgver%.*}?signed") -sha256sums=('SKIP') + "git+https://github.com/elogind/elogind#tag=v${pkgver%.*}?signed" + 'elogind-struct-statx-is-defined.patch') +sha256sums=('SKIP' + '3d6a1b1590bee1e673db1384f570596a8604e2c68adf0a9c1dc81ed67c3943bb') prepare() { cd "$pkgbase" @@ -29,6 +31,8 @@ prepare() { # merge the latest stable commit (fast-foward only to make sure # the verified tag is in) git merge --ff-only "${_commit}" + + patch -Np1 -i ../elogind-struct-statx-is-defined.patch } pkgver() { diff --git a/pcr/elogind/elogind-struct-statx-is-defined.patch b/pcr/elogind/elogind-struct-statx-is-defined.patch new file mode 100644 index 000000000..f89297299 --- /dev/null +++ b/pcr/elogind/elogind-struct-statx-is-defined.patch @@ -0,0 +1,50 @@ +--- a/meson.build 2018-08-29 14:57:20.688786000 -0500 ++++ b/meson.build 2018-09-02 18:00:32.490563287 -0500 +@@ -535,7 +535,7 @@ + #include <linux/ethtool.h> + #include <linux/fib_rules.h> + //#include <linux/stat.h> +-//#include <sys/stat.h> ++#include <sys/stat.h> + ''' + # FIXME: key_serial_t is only defined in keyutils.h, this is bound to fail + +@@ -548,10 +548,24 @@ + ] + + # We get -1 if the size cannot be determined +- have = cc.sizeof(decl, prefix : decl_headers) > 0 ++ have = cc.sizeof(decl, prefix : decl_headers, args : '-D_GNU_SOURCE') > 0 ++ ++ if decl == 'struct statx' ++ if have ++ want_linux_stat_h = false ++ else ++ have = cc.sizeof(decl, ++ prefix : decl_headers + '#include <linux/stat.h>', ++ args : '-D_GNU_SOURCE') > 0 ++ want_linux_stat_h = have ++ endif ++ endif ++ + conf.set10('HAVE_' + decl.underscorify().to_upper(), have) + endforeach + ++conf.set10('WANT_LINUX_STAT_H', want_linux_stat_h) ++ + foreach decl : [['IFLA_INET6_ADDR_GEN_MODE', 'linux/if_link.h'], + ['IN6_ADDR_GEN_MODE_STABLE_PRIVACY', 'linux/if_link.h'], + ['IFLA_VRF_TABLE', 'linux/if_link.h'], +--- a/src/basic/missing.h 2018-08-29 14:57:20.705452000 -0500 ++++ b/src/basic/missing.h 2018-09-02 19:05:17.264515940 -0500 +@@ -44,6 +44,10 @@ + #include <uchar.h> + #include <unistd.h> + ++#if WANT_LINUX_STAT_H ++#include <linux/stat.h> ++#endif ++ + /// Additional includes needed by elogind + #include "musl_missing.h" + |