GNUnet component to mount GNUnet filesystems via FUSE Signed-off-by: Daniel Golle <daniel@makrotopia.org>lilik-openwrt-22.03
@ -0,0 +1,40 @@ | |||||
include $(TOPDIR)/rules.mk | |||||
PKG_NAME:=gnunet-fuse | |||||
PKG_VERSION:=0.11.0 | |||||
PKG_RELEASE:=1 | |||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz | |||||
PKG_SOURCE_URL:=@GNU/gnunet | |||||
PKG_HASH:=4ddf258336c9ce111fe71372aad0bfd792311f6d92753c29293b2cca1fe3bf16 | |||||
PKG_LICENSE:=GPL-3.0 | |||||
PKG_LICENSE_FILES:=COPYING | |||||
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org> | |||||
PKG_BUILD_PARALLEL:=1 | |||||
PKG_FIXUP:=gettext-version | |||||
PKG_INSTALL:=1 | |||||
include $(INCLUDE_DIR)/package.mk | |||||
include $(INCLUDE_DIR)/nls.mk | |||||
define Package/gnunet-fuse | |||||
SECTION:=net | |||||
CATEGORY:=Network | |||||
TITLE:=GNUnet filesystem mount via FUSE | |||||
URL:=https://www.gnunet.org/ | |||||
DEPENDS:=gnunet +gnunet-fs +libfuse | |||||
endef | |||||
CONFIGURE_ARGS+= \ | |||||
--with-libiconv-prefix="$(ICONV_PREFIX)" \ | |||||
--with-libintl-prefix="$(INTL_PREFIX)" \ | |||||
--with-gnunet="$(STAGING_DIR)/usr" | |||||
define Package/gnunet-fuse/install | |||||
$(INSTALL_DIR) $(1)/usr/bin | |||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnunet-fuse $(1)/usr/bin | |||||
endef | |||||
$(eval $(call BuildPackage,gnunet-fuse)) |
@ -0,0 +1,33 @@ | |||||
--- a/src/fuse/mutex.c | |||||
+++ b/src/fuse/mutex.c | |||||
@@ -71,8 +71,13 @@ GNUNET_mutex_create (int isRecursive) | |||||
if (isRecursive) | |||||
{ | |||||
#if LINUX | |||||
+#if defined(__UCLIBC__) || defined(__GLIBC__) | |||||
GNUNET_assert (0 == pthread_mutexattr_setkind_np | |||||
(&attr, PTHREAD_MUTEX_RECURSIVE_NP)); | |||||
+#else | |||||
+ GNUNET_assert (0 == pthread_mutexattr_settype | |||||
+ (&attr, PTHREAD_MUTEX_RECURSIVE)); | |||||
+#endif | |||||
#elif SOMEBSD || GNUNET_freeBSD || GNUNET_freeBSD5 | |||||
GNUNET_assert (0 == pthread_mutexattr_setkind_np | |||||
(&attr, PTHREAD_MUTEX_RECURSIVE)); | |||||
@@ -84,11 +89,16 @@ GNUNET_mutex_create (int isRecursive) | |||||
else | |||||
{ | |||||
#if LINUX | |||||
+#if defined(__UCLIBC__) || defined(__GLIBC__) | |||||
GNUNET_assert (0 == pthread_mutexattr_setkind_np | |||||
(&attr, PTHREAD_MUTEX_ERRORCHECK_NP)); | |||||
#else | |||||
GNUNET_assert (0 == pthread_mutexattr_settype | |||||
(&attr, PTHREAD_MUTEX_ERRORCHECK)); | |||||
+#endif | |||||
+#else | |||||
+ GNUNET_assert (0 == pthread_mutexattr_settype | |||||
+ (&attr, PTHREAD_MUTEX_ERRORCHECK)); | |||||
#endif | |||||
} | |||||
mut = GNUNET_new (struct GNUNET_Mutex); |