Browse Source

liblo: disable tests and enable IPv6

Speeds up compilation.

Also fixed compilation without deprecated POSIX APIs.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
lilik-openwrt-22.03
Rosen Penev 5 years ago
parent
commit
7276289795
No known key found for this signature in database GPG Key ID: 36D31CFA845F0E3B
3 changed files with 43 additions and 1 deletions
  1. +8
    -1
      libs/liblo/Makefile
  2. +15
    -0
      libs/liblo/patches/010-index.patch
  3. +20
    -0
      libs/liblo/patches/020-usleep.patch

+ 8
- 1
libs/liblo/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=liblo
PKG_VERSION:=0.30
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/liblo
@ -45,6 +45,13 @@ $(call Package/liblo/Default)
DEPENDS:= +liblo
endef
CONFIGURE_ARGS += \
$(if $(CONFIG_IPV6),--enable,--disable)-ipv6 \
--enable-threads \
--disable-examples \
--disable-network-tests \
--disable-tests
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/lo $(1)/usr/include/


+ 15
- 0
libs/liblo/patches/010-index.patch View File

@ -0,0 +1,15 @@
--- a/src/server.c
+++ b/src/server.c
@@ -2006,11 +2006,8 @@ static void dispatch_method(lo_server s, const char *path,
tmp = (char*) malloc(strlen(it->path + len) + 1);
strcpy(tmp, it->path + len);
-#if defined(WIN32) || defined(_MSC_VER)
sec = strchr(tmp, '/');
-#else
- sec = index(tmp, '/');
-#endif
+
if (sec)
*sec = '\0';
slend = sl;

+ 20
- 0
libs/liblo/patches/020-usleep.patch View File

@ -0,0 +1,20 @@
--- a/src/tools/oscsendfile.c
+++ b/src/tools/oscsendfile.c
@@ -354,7 +354,7 @@ int send_file(lo_address target, double speed) {
lo_timetag_now(&tt_now);
double wait_time = timetag_diff(*tt_last, tt_now);
if (wait_time > 0.) {
- usleep(wait_time * 1000000);
+ sleep(wait_time);
}
if (b) {
ret = lo_send_bundle(target, b);
@@ -376,7 +376,7 @@ int send_file(lo_address target, double speed) {
lo_timetag_now(&tt_now);
double wait_time = timetag_diff(*tt_last, tt_now);
if (wait_time > 0.) {
- usleep(wait_time * 1000000);
+ sleep(wait_time);
}
lo_send_bundle(target, b);
}

Loading…
Cancel
Save