diff options
author | Nick Hainke <vincent@systemli.org> | 2022-06-27 15:11:47 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2022-07-03 20:25:38 +0200 |
commit | f3a198697f6015ee47780841f0418d0d27f1c9c4 (patch) | |
tree | f18b7f8ae2b11a7b3f14cb3ad191321547a65a29 /package/libs/libjson-c/patches | |
parent | b32f1650480b08b39a75e9b0da2a3517955ebb56 (diff) | |
download | upstream-f3a198697f6015ee47780841f0418d0d27f1c9c4.tar.gz upstream-f3a198697f6015ee47780841f0418d0d27f1c9c4.tar.bz2 upstream-f3a198697f6015ee47780841f0418d0d27f1c9c4.zip |
libjson-c: update to 0.16
Fix:
- 001-dont-build-docs.patch
Remove upstreamed patch:
- 010-clang.patch
Changelog:
Deprecated and removed features:
--------------------------------
* JSON_C_OBJECT_KEY_IS_CONSTANT is deprecated in favor of
JSON_C_OBJECT_ADD_CONSTANT_KEY
* Direct access to lh_table and lh_entry structure members is deprecated.
Use access functions instead, lh_table_head(), lh_entry_next(), etc...
* Drop REFCOUNT_DEBUG code.
New features
------------
* The 0.16 release introduces no new features
Build changes
-------------
* Add a DISABLE_EXTRA_LIBS option to skip using libbsd
* Add a DISABLE_JSON_POINTER option to skip compiling in json_pointer support.
Significant changes and bug fixes
---------------------------------
* Cap string length at INT_MAX to avoid various issues with very long strings.
* json_object_deep_copy: fix deep copy of strings containing '\0'
* Fix read past end of buffer in the "json_parse" command
* Avoid out of memory accesses in the locally provided vasprintf() function
(for those platforms that use it)
* Handle allocation failure in json_tokener_new_ex
* Fix use-after-free in json_tokener_new_ex() in the event of printbuf_new() returning NULL
* printbuf_memset(): set gaps to zero - areas within the print buffer which
have not been initialized by using printbuf_memset
* printbuf: return -1 on invalid arguments (len < 0 or total buffer > INT_MAX)
* sprintbuf(): propagate printbuf_memappend errors back to the caller
Optimizations
--------------
* Speed up parsing by replacing ctype functions with simplified, faster
non-locale-sensitive ones in json_tokener and json_object_to_json_string.
* Neither vertical tab nor formfeed are considered whitespace per the JSON spec
* json_object: speed up creation of objects, calloc() -> malloc() + set fields
* Avoid needless extra strlen() call in json_c_shallow_copy_default() and
json_object_equal() when the object is known to be a json_type_string.
Other changes
-------------
* Validate size arguments in arraylist functions.
* Use getrandom() if available; with GRND_NONBLOCK to allow use of json-c
very early during boot, such as part of cryptsetup.
* Use arc4random() if it's available.
* random_seed: on error, continue to next method instead of exiting the process
* Close file when unable to read from /dev/urandom in get_dev_random_seed()
Signed-off-by: Nick Hainke <vincent@systemli.org>
Diffstat (limited to 'package/libs/libjson-c/patches')
-rw-r--r-- | package/libs/libjson-c/patches/001-dont-build-docs.patch | 8 | ||||
-rw-r--r-- | package/libs/libjson-c/patches/010-clang.patch | 11 |
2 files changed, 4 insertions, 15 deletions
diff --git a/package/libs/libjson-c/patches/001-dont-build-docs.patch b/package/libs/libjson-c/patches/001-dont-build-docs.patch index 1aa0da4f59..f35da80724 100644 --- a/package/libs/libjson-c/patches/001-dont-build-docs.patch +++ b/package/libs/libjson-c/patches/001-dont-build-docs.patch @@ -1,11 +1,11 @@ --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -401,8 +401,6 @@ set(JSON_C_SOURCES +@@ -433,8 +433,6 @@ configure_file(json.h.cmakein ${PROJECT_ include_directories(${PROJECT_SOURCE_DIR}) include_directories(${PROJECT_BINARY_DIR}) -add_subdirectory(doc) - - # uninstall - add_custom_target(uninstall - COMMAND cat ${PROJECT_BINARY_DIR}/install_manifest.txt | xargs rm + # "uninstall" custom target for make generators in unix like operating systems + # and if that target is not present + if (CMAKE_GENERATOR STREQUAL "Unix Makefiles") diff --git a/package/libs/libjson-c/patches/010-clang.patch b/package/libs/libjson-c/patches/010-clang.patch deleted file mode 100644 index 9ef73f1a82..0000000000 --- a/package/libs/libjson-c/patches/010-clang.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -265,7 +265,7 @@ message(STATUS "Wrote ${PROJECT_BINARY_D - configure_file(${PROJECT_SOURCE_DIR}/cmake/json_config.h.in ${PROJECT_BINARY_DIR}/json_config.h) - message(STATUS "Wrote ${PROJECT_BINARY_DIR}/json_config.h") - --if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") -+if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections") - if ("${DISABLE_WERROR}" STREQUAL "OFF") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") |