Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
From dfb3e868248d86fc0f5553dffbb6f7c367c3c383 Mon Sep 17 00:00:00 2001
|
||||
From: Steffen Jaeckel <s@jaeckel.eu>
|
||||
Date: Wed, 26 Mar 2025 14:14:19 +0100
|
||||
Subject: [PATCH] Use `void*` to store function pointer when compiled as C23.
|
||||
|
||||
[0] decided that `rettype (*foo)();` must now be interpreted as
|
||||
`rettype (*foo)(void);`. Luckily it also allows now to store function
|
||||
pointers in a `void*` (c.f. Ch. J.5.7).
|
||||
|
||||
[0]: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf
|
||||
|
||||
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
|
||||
|
||||
Upstream: https://github.com/strophe/libstrophe/commit/dfb3e868248d86fc0f5553dffbb6f7c367c3c383
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
||||
---
|
||||
src/common.h | 7 ++++++-
|
||||
src/handler.c | 2 --
|
||||
2 files changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/common.h b/src/common.h
|
||||
index 75134be..c387c0f 100644
|
||||
--- a/src/common.h
|
||||
+++ b/src/common.h
|
||||
@@ -30,12 +30,17 @@
|
||||
#include "snprintf.h"
|
||||
|
||||
/** handlers **/
|
||||
+#if (__STDC_VERSION__ >= 202000L)
|
||||
+typedef void* xmpp_void_handler;
|
||||
+#else
|
||||
+typedef int (*xmpp_void_handler)();
|
||||
+#endif
|
||||
|
||||
typedef struct _xmpp_handlist_t xmpp_handlist_t;
|
||||
struct _xmpp_handlist_t {
|
||||
/* common members */
|
||||
int user_handler;
|
||||
- int (*handler)();
|
||||
+ xmpp_void_handler handler;
|
||||
void *userdata;
|
||||
int enabled; /* handlers are added disabled and enabled after the
|
||||
* handler chain is processed to prevent stanzas from
|
||||
diff --git a/src/handler.c b/src/handler.c
|
||||
index 1c9bf9f..0577252 100644
|
||||
--- a/src/handler.c
|
||||
+++ b/src/handler.c
|
||||
@@ -25,8 +25,6 @@
|
||||
#include "common.h"
|
||||
#include "ostypes.h"
|
||||
|
||||
-typedef int (*xmpp_void_handler)();
|
||||
-
|
||||
/* Remove item from the list pointed by head, but don't free it.
|
||||
* There can be a situation when user's handler deletes another handler which
|
||||
* is the previous in the list. handler_fire_stanza() and handler_fire_timed()
|
||||
--
|
||||
2.47.3
|
||||
|
||||
15
package/libstrophe/Config.in
Normal file
15
package/libstrophe/Config.in
Normal file
@@ -0,0 +1,15 @@
|
||||
config BR2_PACKAGE_LIBSTROPHE
|
||||
bool "libstrophe"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_GNUTLS
|
||||
select BR2_PACKAGE_LIBXML2 if !BR2_PACKAGE_EXPAT
|
||||
help
|
||||
libstrophe is a lightweight XMPP client library written in C.
|
||||
It has minimal dependencies and is configurable for various
|
||||
environments. It runs well on both Linux, Unix, and Windows
|
||||
based platforms.
|
||||
|
||||
https://github.com/strophe/libstrophe
|
||||
|
||||
comment "libstrophe needs a toolchain w/ threads"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS
|
||||
4
package/libstrophe/libstrophe.hash
Normal file
4
package/libstrophe/libstrophe.hash
Normal file
@@ -0,0 +1,4 @@
|
||||
# Locally calculated
|
||||
sha256 8a7ebc274bd79fa4e5dfcfbf06123adbc9f70abd8bebf2843c2940e9086aeee0 libstrophe-0.14.0.tar.xz
|
||||
sha256 82476f36ffd5e895a176013c0812166ba7b7d99f3d536fc7f5ed2e33e9f74a08 MIT-LICENSE.txt
|
||||
sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 GPL-LICENSE.txt
|
||||
39
package/libstrophe/libstrophe.mk
Normal file
39
package/libstrophe/libstrophe.mk
Normal file
@@ -0,0 +1,39 @@
|
||||
################################################################################
|
||||
#
|
||||
# libstrophe
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LIBSTROPHE_VERSION = 0.14.0
|
||||
LIBSTROPHE_SOURCE = libstrophe-$(LIBSTROPHE_VERSION).tar.xz
|
||||
LIBSTROPHE_SITE = https://github.com/strophe/libstrophe/releases/download/$(LIBSTROPHE_VERSION)
|
||||
LIBSTROPHE_DEPENDENCIES = host-pkgconf
|
||||
LIBSTROPHE_LICENSE = MIT or GPL-3.0
|
||||
LIBSTROPHE_LICENSE_FILES = MIT-LICENSE.txt GPL-LICENSE.txt
|
||||
LIBSTROPHE_INSTALL_STAGING = YES
|
||||
LIBSTROPHE_CONF_OPTS = --disable-examples
|
||||
|
||||
ifeq ($(BR2_PACKAGE_C_ARES),y)
|
||||
LIBSTROPHE_CONF_OPTS += --enable-cares
|
||||
LIBSTROPHE_DEPENDENCIES += c-ares
|
||||
else
|
||||
LIBSTROPHE_CONF_OPTS += --disable-cares
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_EXPAT),y)
|
||||
LIBSTROPHE_CONF_OPTS += --without-libxml2
|
||||
LIBSTROPHE_DEPENDENCIES += expat
|
||||
else
|
||||
LIBSTROPHE_CONF_OPTS += --with-libxml2
|
||||
LIBSTROPHE_DEPENDENCIES += libxml2
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
||||
LIBSTROPHE_CONF_OPTS += --with-tls --without-gnutls
|
||||
LIBSTROPHE_DEPENDENCIES += openssl
|
||||
else
|
||||
LIBSTROPHE_CONF_OPTS += --with-gnutls --without-tls
|
||||
LIBSTROPHE_DEPENDENCIES += gnutls
|
||||
endif
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user