Commit 418eafc8 authored by Natanael Copa's avatar Natanael Copa

testing/ell: fix test suite and a bug in utf8

parent d96e437b
......@@ -2,16 +2,18 @@
# Maintainer: Milan P. Stanić <mps@arvanta.net>
pkgname=ell
pkgver=0.17
pkgrel=0
pkgrel=1
pkgdesc="Linux library for embedded development"
url="https://01.org/ell"
arch="all"
license="GPL-2.0-only"
depends=""
makedepends="glib-dev"
options="!check" #Currently some tests fail. This is an environmental problem to test
makedepends="glib-dev linux-headers"
checkdepends="dbus"
subpackages="$pkgname-dev"
source="https://mirrors.edge.kernel.org/pub/linux/libs/ell/$pkgname-${pkgver}.tar.gz"
source="https://mirrors.edge.kernel.org/pub/linux/libs/ell/$pkgname-${pkgver}.tar.gz
musl-fixes-testsuite.patch
fix-utf8.patch"
builddir="$srcdir/$pkgname-${pkgver}"
build() {
......@@ -37,4 +39,6 @@ package() {
make DESTDIR="$pkgdir" install
}
sha512sums="2f35214283bc2b0d17b27a096a0457679747966cad284e3bc581b9414909f98eb3bae9c33d30e62992dccf2331886af505a07e6a73df4c54d3ac476f6791da56 ell-0.17.tar.gz"
sha512sums="2f35214283bc2b0d17b27a096a0457679747966cad284e3bc581b9414909f98eb3bae9c33d30e62992dccf2331886af505a07e6a73df4c54d3ac476f6791da56 ell-0.17.tar.gz
ee93edab6618343bec00db9c4a5279a8f4cbb6ecf6ae62cac99c688377bb4ca4f04d5bc6a32a702071d16e8988f4c0eff2291fb04e91b8f9ed909ce88329f67f musl-fixes-testsuite.patch
6973f65fff8b281d56b25b0abc1dd3673953ae6c1c234da94608148937afc783417398300cc090f841668cf1a898d2780b6f109539ce108949258cac1edfcd4c fix-utf8.patch"
diff --git a/ell/utf8.c b/ell/utf8.c
index e9998f7..b1e8440 100644
--- a/ell/utf8.c
+++ b/ell/utf8.c
@@ -93,7 +93,7 @@ LIB_EXPORT int l_utf8_get_codepoint(const char *str, size_t len, wchar_t *cp)
if (len == 0)
return 0;
- if (str[0] > 0) {
+ if ((signed char)str[0] > 0) {
*cp = str[0];
return 1;
}
diff --git a/unit/test-dbus-message-fds.c b/unit/test-dbus-message-fds.c
index d6d0b38..217bc70 100644
--- a/unit/test-dbus-message-fds.c
+++ b/unit/test-dbus-message-fds.c
@@ -37,6 +37,10 @@
#include <ell/ell.h>
#include "ell/dbus-private.h"
+#ifndef WAIT_ANY
+#define WAIT_ANY (-1)
+#endif
+
#define TEST_BUS_ADDRESS "unix:path=/tmp/ell-test-bus"
static pid_t dbus_daemon_pid = -1;
diff --git a/unit/test-dbus-properties.c b/unit/test-dbus-properties.c
index f91ba73..b6fa776 100644
--- a/unit/test-dbus-properties.c
+++ b/unit/test-dbus-properties.c
@@ -34,6 +34,10 @@
#include <ell/ell.h>
#include "ell/dbus-private.h"
+#ifndef WAIT_ANY
+#define WAIT_ANY (-1)
+#endif
+
#define TEST_BUS_ADDRESS "unix:path=/tmp/ell-test-bus"
static pid_t dbus_daemon_pid = -1;
diff --git a/unit/test-dbus.c b/unit/test-dbus.c
index d5bd8c5..f63a281 100644
--- a/unit/test-dbus.c
+++ b/unit/test-dbus.c
@@ -31,6 +31,10 @@
#include <ell/ell.h>
+#ifndef WAIT_ANY
+#define WAIT_ANY (-1)
+#endif
+
#define TEST_BUS_ADDRESS "unix:path=/tmp/ell-test-bus"
static pid_t dbus_daemon_pid = -1;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment