diff options
author | Erich Eckner <git@eckner.net> | 2019-01-09 10:27:45 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-01-09 10:27:45 +0100 |
commit | 4d891ec9f23e1c900d6faf4e07948a7bba44232a (patch) | |
tree | 9668432b615703a3c76243c0c5eb7f96d161ed56 /conky-irc | |
parent | bf90203df1ced234e725c6f2db3ccac2b4bfb9ff (diff) | |
download | archlinuxewe.git.save-4d891ec9f23e1c900d6faf4e07948a7bba44232a.tar.xz |
conky-irc: fix-type-mismatch.patch neu
Diffstat (limited to 'conky-irc')
-rw-r--r-- | conky-irc/PKGBUILD | 7 | ||||
-rw-r--r-- | conky-irc/fix-type-mismatch.patch | 13 |
2 files changed, 18 insertions, 2 deletions
diff --git a/conky-irc/PKGBUILD b/conky-irc/PKGBUILD index da0bd254..92ecc059 100644 --- a/conky-irc/PKGBUILD +++ b/conky-irc/PKGBUILD @@ -19,15 +19,18 @@ depends=('glib2' 'lua' 'wireless_tools' 'libxdamage' 'libxinerama' 'libxft' 'imlib2' 'libxml2' 'libpulse' 'libircclient') optdepends=('mounted') source=("${pkgname%-irc}-${pkgver}.tar.gz::https://github.com/brndnmtthws/conky/archive/v${pkgver}.tar.gz" - 'MAX_SP.patch') + 'MAX_SP.patch' + 'fix-type-mismatch.patch') sha512sums=('bdc501311c364dc357b53bd61ce0073115371672bc6e7347c3e514a45d1e7a0a584be151630791ddfbec85eecb33e00cc3c9c317567a91f2418ddd0c384eff1b' - '1ea39f88b5f2620fc0c4485cc16645dbad91f97be17b4b13a732205dde6265d621c7f2bc92be33b65f9db2815312beb42b516ddebbba90cfe947104e1a410a52') + '1ea39f88b5f2620fc0c4485cc16645dbad91f97be17b4b13a732205dde6265d621c7f2bc92be33b65f9db2815312beb42b516ddebbba90cfe947104e1a410a52' + 'ff6837139ac2c8983d02f8288a4502c908cbf7dc0b2cfb1370e671a2067d983c6700f05b0d246cded6cc00f059eb9c064828ffa8ddae4004eca2e942cd893f62') options=('!strip' 'debug') prepare() { cd "${srcdir}/${pkgname%-irc}-${pkgver}" patch -p1 -i ../MAX_SP.patch + patch -p1 -i "${srcdir}/fix-type-mismatch.patch" sed '/^#include / s,<libircclient\.h>,<libircclient/libircclient.h>,' -i 'src/irc.cc' sed '/check_include_files(/ s,libircclient\.h,libircclient/libircclient.h,' -i 'cmake/ConkyPlatformChecks.cmake' } diff --git a/conky-irc/fix-type-mismatch.patch b/conky-irc/fix-type-mismatch.patch new file mode 100644 index 00000000..a84d05e2 --- /dev/null +++ b/conky-irc/fix-type-mismatch.patch @@ -0,0 +1,13 @@ +diff --git a/src/linux.cc b/src/linux.cc +index 0a7d4331..09fa6c99 100644 +--- a/src/linux.cc ++++ b/src/linux.cc +@@ -1169,7 +1169,7 @@ static int open_sysfs_sensor(const char *dir, const char *dev, const char *type, + fd = open(path, O_RDONLY); + if (fd < 0) { + /* if it fails, strip the /device from dev and attempt again */ +- size_t len_to_trunc = std::max(7UL, strnlen(buf, 255)) - 7; ++ size_t len_to_trunc = std::max((size_t)7UL, strnlen(buf, 255)) - 7; + buf[len_to_trunc] = 0; + snprintf(path, 255, "%s%s/%s%d_input", dir, dev, type, n); + fd = open(path, O_RDONLY); |