<feed xmlns='http://www.w3.org/2005/Atom'>
<title>libubox/examples, branch master</title>
<subtitle>C utility functions for OpenWrt</subtitle>
<id>https://git.openwrt.org/project/libubox/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/project/libubox/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/libubox/'/>
<updated>2025-10-07T12:19:52Z</updated>
<entry>
<title>examples: CMakeLists: drop redundant cmake_minimum_required</title>
<updated>2025-10-07T12:19:52Z</updated>
<author>
<name>David Härdeman</name>
</author>
<published>2025-10-05T15:49:28Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/libubox/commit/?id=61cc1e6fdc0eec075869e1d4d2e6e98c10856b97'/>
<id>urn:sha1:61cc1e6fdc0eec075869e1d4d2e6e98c10856b97</id>
<content type='text'>
The examples depend on the parent libubox project and can't be built
independently.

Drop redundant cmake_minimum_required from examples/CMakeLists.txt
and inherit the version from the parent CMake project to keep
version consistency.

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Link: https://github.com/openwrt/libubox/pull/21
Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
</content>
</entry>
<entry>
<title>examples: CMakeLists: update cmake minimum required version to 3.10</title>
<updated>2025-10-03T22:05:58Z</updated>
<author>
<name>Christian Marangi</name>
</author>
<published>2025-10-03T22:05:58Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/libubox/commit/?id=eeb6fcf914139a07bcd337cf90033239f1a8b1d1'/>
<id>urn:sha1:eeb6fcf914139a07bcd337cf90033239f1a8b1d1</id>
<content type='text'>
New cmake version 4.0 requires at least 3.5 version as the minimum
required version with it increased to 3.10 in to-be-released cmake
versions.

Set the minimum required version to 3.10 to future-proof for future
cmake version.

Suggested-by: Hannu Nyman &lt;hannu.nyman@iki.fi&gt;
Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
</content>
</entry>
<entry>
<title>uloop: add support for user defined signal handlers</title>
<updated>2023-11-02T16:56:45Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2023-10-16T14:35:28Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/libubox/commit/?id=13d9b04fb09d39a7204ba1e9cc9c8403fa22efa8'/>
<id>urn:sha1:13d9b04fb09d39a7204ba1e9cc9c8403fa22efa8</id>
<content type='text'>
Reuse and extend the existing signal waker pipe mechanism to add user
defined signal handling functionality to uloop.

This commit introduces two new api functions `uloop_signal_add()` and
`uloop_signal_remove()` along with a new structure type `uloop_signal`
to allow adding and removing arbitrary signal handlers.

Registered signal handlers are maintained in a linked list and matched
by their signo member value which allows registering multiple handlers
for the same signal numbers.

Upon registering a new signal handler, the existing handler is saved
in the `uloop_signal` structure. When removing the user defined signal
handler, the original behavior is restored.

The Lua binding has been updated as well to support the new signal
handler mechanism.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>uloop: add support for interval timers</title>
<updated>2023-11-02T16:49:55Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2023-10-14T22:17:36Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/libubox/commit/?id=82fa6480de7a85d0ced0701ab7c8825e31b90770'/>
<id>urn:sha1:82fa6480de7a85d0ced0701ab7c8825e31b90770</id>
<content type='text'>
So far, the only way to implement periodic interval timers was to use
one-shot uloop_timeout timers which are rearmed within their completion
callback immediately on expiration.

While simple, this approach is not very precise and interval lengths will
slowly drift over time, due to callback execution overhead, scheduling
granularity etc.

In order to make uloop provide stable and precise interval timer
capabilities, this commit introduces a new `uloop_interval` structure
along with the new related `uloop_interval_set()`, `uloop_interval_cancel()`
and `uloop_interval_remaining()` api functions.

Periodic timers are implemented using the timerfd facility an Linux and
kqueue EVFILT_TIMER events on macOS/BSD.

The Lua binding has been updated to include support for the new timer type
as well.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>examples/lua: attempt to highlight some traps</title>
<updated>2020-07-11T09:15:12Z</updated>
<author>
<name>Karl Palsson</name>
</author>
<published>2020-06-30T10:38:44Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/libubox/commit/?id=f4e9bf73ac5c0ee6b8f240e2a2100e70ca56d705'/>
<id>urn:sha1:f4e9bf73ac5c0ee6b8f240e2a2100e70ca56d705</id>
<content type='text'>
Ran into some issues with my fd event being garbage collected.  As I
never wanted to call :delete, I had seen no reason to keep the returned
object, as my callback and upvalues were still valid.

Signed-off-by: Karl Palsson &lt;karlp@etactica.com&gt;
</content>
</entry>
<entry>
<title>add cram based unit tests</title>
<updated>2019-11-24T12:26:58Z</updated>
<author>
<name>Petr Štetiar</name>
</author>
<published>2019-11-19T13:31:44Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/libubox/commit/?id=b0a5cd8a28bf1d1883317ceac6cb8967d840d6ae'/>
<id>urn:sha1:b0a5cd8a28bf1d1883317ceac6cb8967d840d6ae</id>
<content type='text'>
For improved QA etc. For the start with initial test cases for avl,
base64, jshn and list components. Moved runqueue and blobmsg from
examples to tests.  Converted just a few first test cases from
json-script example into the new cram based unit test, more to come.

Signed-off-by: Petr Štetiar &lt;ynezz@true.cz&gt;
</content>
</entry>
<entry>
<title>iron out all extra compiler warnings</title>
<updated>2019-11-20T13:34:01Z</updated>
<author>
<name>Petr Štetiar</name>
</author>
<published>2019-06-10T06:47:38Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/libubox/commit/?id=6228df9de91d4047ca89f7db670788f3d9b51170'/>
<id>urn:sha1:6228df9de91d4047ca89f7db670788f3d9b51170</id>
<content type='text'>
gcc-9 on x86/64 has reported following issues:

 base64.c:173:17: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
 base64.c:230:18: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
 base64.c:238:18: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
 base64.c:242:22: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
 base64.c:252:18: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
 base64.c:256:22: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
 base64.c:266:18: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
 base64.c:315:27: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
 base64.c:329:15: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
 blob.c:207:11: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Werror=sign-compare]
 blob.c:210:11: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Werror=sign-compare]
 blob.c:243:31: error: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Werror=sign-compare]
 blob.c:246:31: error: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Werror=sign-compare]
 blob.h:245:37: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Werror=sign-compare]
 blob.h:253:37: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Werror=sign-compare]
 blobmsg.h:269:37: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Werror=sign-compare]
 blobmsg_json.c:155:10: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
 examples/../blob.h:245:37: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Werror=sign-compare]
 examples/../blobmsg.h:269:37: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Werror=sign-compare]
 json_script.c:590:7: error: this statement may fall through [-Werror=implicit-fallthrough=]

Signed-off-by: Petr Štetiar &lt;ynezz@true.cz&gt;
</content>
</entry>
<entry>
<title>blobmsg: add support for double</title>
<updated>2017-01-04T20:36:31Z</updated>
<author>
<name>André Gaul</name>
</author>
<published>2016-11-19T17:55:49Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/libubox/commit/?id=7f671b1e68a6664b5baf3e3cffc1bb0880984267'/>
<id>urn:sha1:7f671b1e68a6664b5baf3e3cffc1bb0880984267</id>
<content type='text'>
This adds support for double floating point type to make it more JSON
compatible. For type checking it also adds a stub BLOB_ATTR_DOUBLE type.
If necessary, the accessor functions for blob can be added later

Signed-off-by: André Gaul &lt;andre@gaul.io&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>examples: add shunit2 tests for json_script</title>
<updated>2016-02-20T12:36:08Z</updated>
<author>
<name>Yousong Zhou</name>
</author>
<published>2016-02-17T07:45:06Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/libubox/commit/?id=5326ce1046425154ab715387949728cfb09f4083'/>
<id>urn:sha1:5326ce1046425154ab715387949728cfb09f4083</id>
<content type='text'>
Signed-off-by: Yousong Zhou &lt;yszhou4tech@gmail.com&gt;
</content>
</entry>
<entry>
<title>json_script: add "isdir" support</title>
<updated>2016-02-20T12:36:08Z</updated>
<author>
<name>Yousong Zhou</name>
</author>
<published>2016-02-17T07:45:05Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/libubox/commit/?id=02db6d71b67d9efe33292fbf7f92da888aaf879f'/>
<id>urn:sha1:02db6d71b67d9efe33292fbf7f92da888aaf879f</id>
<content type='text'>
Signed-off-by: Yousong Zhou &lt;yszhou4tech@gmail.com&gt;
</content>
</entry>
</feed>
