added my Recipes

This commit is contained in:
2024-07-11 14:16:35 +02:00
parent 38bc4f53ac
commit 09b621d929
7118 changed files with 525762 additions and 3 deletions

View File

@@ -0,0 +1,42 @@
From a12325a0cbf3bf1d66a0b0f8d85e08083bae6066 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz@true.cz>
Date: Wed, 25 Dec 2019 10:27:59 +0100
Subject: [PATCH] blobmsg: fix array out of bounds GCC 10 warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes following warning reported by GCC 10.0.0 20191203:
blobmsg.c:234:2: error: 'strcpy' offset 6 from the object at 'attr' is out of the bounds of referenced subobject 'name' with type 'uint8_t[0]' {aka 'unsigned char[0]'} at offset 6 [-Werror=array-bounds]
234 | strcpy((char *) hdr->name, (const char *)name);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from blobmsg.c:16:
blobmsg.h:42:10: note: subobject 'name' declared here
42 | uint8_t name[];
| ^~~~
Upstream-Status: Submitted [https://gitlab.com/ynezz/openwrt-libubox/commit/3775b3aa28de8c20d96b6f02786a327423b0748a]
Reported-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
---
blobmsg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/blobmsg.c b/blobmsg.c
index a860483..b6b7535 100644
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -195,7 +195,7 @@ blobmsg_new(struct blob_buf *buf, int type, const char *name, int payload_len, v
attr->id_len |= be32_to_cpu(BLOB_ATTR_EXTENDED);
hdr = blob_data(attr);
hdr->namelen = cpu_to_be16(namelen);
- strcpy((char *) hdr->name, (const char *)name);
+ memcpy(hdr->name, name, namelen);
pad_end = *data = blobmsg_data(attr);
pad_start = (char *) &hdr->name[namelen];
if (pad_start < pad_end)
--
2.24.1

View File

@@ -0,0 +1,28 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 57804cf..1aa7f27 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,6 +18,7 @@ ENDIF()
SET(SOURCES avl.c avl-cmp.c blob.c blobmsg.c uloop.c usock.c ustream.c ustream-fd.c vlist.c utils.c safe_list.c runqueue.c md5.c kvlist.c ulog.c base64.c)
ADD_LIBRARY(ubox SHARED ${SOURCES})
+SET_TARGET_PROPERTIES(ubox PROPERTIES VERSION 1.0.1 SOVERSION 1)
ADD_LIBRARY(ubox-static STATIC ${SOURCES})
SET_TARGET_PROPERTIES(ubox-static PROPERTIES OUTPUT_NAME ubox)
@@ -46,6 +47,7 @@ find_library(json NAMES json-c)
IF(EXISTS ${json})
ADD_LIBRARY(blobmsg_json SHARED blobmsg_json.c)
TARGET_LINK_LIBRARIES(blobmsg_json ubox ${json})
+ SET_TARGET_PROPERTIES(blobmsg_json PROPERTIES VERSION 1.0.1 SOVERSION 1)
ADD_LIBRARY(blobmsg_json-static STATIC blobmsg_json.c)
SET_TARGET_PROPERTIES(blobmsg_json-static
@@ -55,6 +57,7 @@ IF(EXISTS ${json})
TARGET_LINK_LIBRARIES(jshn blobmsg_json ${json})
ADD_LIBRARY(json_script SHARED json_script.c)
+ SET_TARGET_PROPERTIES(json_script PROPERTIES VERSION 1.0.1 SOVERSION 1)
TARGET_LINK_LIBRARIES(json_script ubox)
INSTALL(TARGETS blobmsg_json blobmsg_json-static jshn json_script

View File

@@ -0,0 +1,40 @@
[PATCH] fix the CMAKE_INSTALL_LIBDIR
Upstream-Status: Pending
libdir maybe /usr/lib64 for 64bit machine
Signed-off-by: Roy Li <rongqing.li@windriver.com>
---
CMakeLists.txt | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 57804cf..2c7bdc1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,8 +35,8 @@ INSTALL(FILES ${headers}
DESTINATION include/libubox
)
INSTALL(TARGETS ubox ubox-static
- ARCHIVE DESTINATION lib
- LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
ADD_SUBDIRECTORY(lua)
@@ -58,8 +58,8 @@ IF(EXISTS ${json})
TARGET_LINK_LIBRARIES(json_script ubox)
INSTALL(TARGETS blobmsg_json blobmsg_json-static jshn json_script
- ARCHIVE DESTINATION lib
- LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION bin
)
--
1.9.1

View File

@@ -0,0 +1,31 @@
DESCRIPTION = "C utility functions for OpenWrt"
SECTION = "libs"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "\
file://avl.c;endline=39;md5=00810155fed3d604816ec5814523d60a \
file://avl-cmp.c;endline=15;md5=1603e6094b432a5f3f320877a06f41b5 \
file://base64.c;endline=61;md5=51fdff010d45b0086ac0a6e035693dc0 \
file://blobmsg.c;endline=15;md5=7ed64c1570e8c9b46c4fc6fbd16c489e \
file://list.h;endline=28;md5=2d5f5475fbd0f08741354c5a99c2e983 \
file://md5.h;endline=39;md5=048bf9f68963c207a0c2b3a94c9d2aaa \
file://md5.c;endline=51;md5=0a448eea0bcbc89e3c7e6608f2d119a0 \
file://usock.h;endline=18;md5=f0dfdc8de858e66d66d74036611bba14 \
"
SRC_URI = "\
git://git.openwrt.org/project/libubox.git;branch=master \
file://0001-version-libraries.patch \
file://fix-libdir.patch \
file://0001-blobmsg-fix-array-out-of-bounds-GCC-10-warning.patch \
"
SRCREV = "07413cce72e19520af55dfcbc765484f5ab41dd9"
PV = "1.0.1+git${SRCPV}"
S = "${WORKDIR}/git"
inherit cmake pkgconfig
DEPENDS = "json-c"
EXTRA_OECMAKE = "-DBUILD_EXAMPLES=OFF -DBUILD_LUA=OFF"