git: 5d3e7166f6a0 - main - libcbor: update to 0.10.2

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Fri, 21 Apr 2023 20:10:54 UTC
The branch main has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=5d3e7166f6a0187fa3f8831b16a06bd9955c21ff

commit 5d3e7166f6a0187fa3f8831b16a06bd9955c21ff
Merge: 41df1d60e323 058aa793d837
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2023-04-21 20:09:03 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2023-04-21 20:10:03 +0000

    libcbor: update to 0.10.2
    
    Sponsored by:   The FreeBSD Foundation

 contrib/libcbor/.circleci/config.yml               | 224 ++++++
 .../libcbor/.github/ISSUE_TEMPLATE/bug_report.md   |  20 +
 contrib/libcbor/.github/PULL_REQUEST_TEMPLATE      |  15 +
 contrib/libcbor/.github/workflows/fuzz-pr.yml      |  25 +
 contrib/libcbor/.github/workflows/fuzz.yml         |   6 +-
 contrib/libcbor/.gitignore                         |   8 +
 contrib/libcbor/.travis.yml                        |  66 --
 contrib/libcbor/Bazel.md                           | 100 +++
 contrib/libcbor/CHANGELOG.md                       |  47 ++
 contrib/libcbor/CMakeLists.txt                     |  54 +-
 contrib/libcbor/CMakeModules/FindCMocka.cmake      |   8 +
 contrib/libcbor/CMakeModules/JoinPaths.cmake       |  23 +
 contrib/libcbor/CONTRIBUTING.md                    |  35 +
 contrib/libcbor/Doxyfile                           | 778 ++++++++++++++-------
 contrib/libcbor/README.md                          |  54 +-
 contrib/libcbor/appveyor.yml                       |  19 +-
 contrib/libcbor/clang-format.sh                    |   9 +-
 contrib/libcbor/codecov.yml                        |   9 +-
 contrib/libcbor/doc/source/api.rst                 |   4 +-
 contrib/libcbor/doc/source/api/encoding.rst        |   4 +
 .../doc/source/api/item_reference_counting.rst     |  19 +-
 .../decoding.rst => api/streaming_decoding.rst}    |  14 +-
 .../libcbor/doc/source/api/streaming_encoding.rst  |  65 ++
 contrib/libcbor/doc/source/api/type_2.rst          |   5 -
 contrib/libcbor/doc/source/api/type_3.rst          |   6 +-
 contrib/libcbor/doc/source/api/type_4.rst          |   9 +-
 contrib/libcbor/doc/source/api/type_5.rst          |  26 +-
 contrib/libcbor/doc/source/api/type_7.rst          |   9 +-
 contrib/libcbor/doc/source/conf.py                 |   4 +-
 contrib/libcbor/doc/source/getting_started.rst     |   7 +-
 contrib/libcbor/doc/source/index.rst               |   1 -
 contrib/libcbor/doc/source/requirements.txt        |  60 +-
 contrib/libcbor/doc/source/rfc_conformance.rst     |   4 +-
 contrib/libcbor/doc/source/streaming.rst           |  13 -
 contrib/libcbor/doc/source/streaming/encoding.rst  |   4 -
 contrib/libcbor/doc/source/using.rst               |  11 +-
 contrib/libcbor/examples/CMakeLists.txt            |   3 +
 contrib/libcbor/examples/bazel/README.md           |  33 +
 contrib/libcbor/examples/bazel/WORKSPACE           |  19 +
 contrib/libcbor/examples/bazel/src/BUILD           |  46 ++
 contrib/libcbor/examples/bazel/src/hello.cc        |   7 +
 contrib/libcbor/examples/bazel/src/hello.h         |   8 +
 contrib/libcbor/examples/bazel/src/hello_test.cc   |  10 +
 contrib/libcbor/examples/bazel/src/main.cc         |  10 +
 contrib/libcbor/examples/bazel/third_party/BUILD   |   1 +
 .../examples/bazel/third_party/libcbor.BUILD       |  21 +
 .../examples/bazel/third_party/libcbor/BUILD       |  11 +
 .../bazel/third_party/libcbor/cbor/cbor_export.h   |  42 ++
 .../bazel/third_party/libcbor/cbor/configuration.h |  15 +
 contrib/libcbor/examples/cjson2cbor.c              |   8 +-
 contrib/libcbor/examples/create_items.c            |  25 +-
 contrib/libcbor/examples/hello.c                   |   3 +-
 contrib/libcbor/examples/readfile.c                |   3 +-
 contrib/libcbor/examples/sort.c                    |  15 +-
 contrib/libcbor/examples/streaming_array.c         |  47 ++
 contrib/libcbor/examples/streaming_parser.c        |  10 +-
 contrib/libcbor/misc/update_version.py             |  29 +-
 contrib/libcbor/oss-fuzz/build.sh                  |   2 +-
 contrib/libcbor/oss-fuzz/cbor_load_fuzzer.cc       |  54 +-
 contrib/libcbor/release.sh                         |   8 +-
 contrib/libcbor/src/CMakeLists.txt                 |  18 +-
 contrib/libcbor/src/cbor.c                         | 144 ++--
 contrib/libcbor/src/cbor.h                         |  26 +-
 contrib/libcbor/src/cbor/arrays.c                  |  22 +-
 contrib/libcbor/src/cbor/arrays.h                  |  71 +-
 contrib/libcbor/src/cbor/bytestrings.c             |  40 +-
 contrib/libcbor/src/cbor/bytestrings.h             |  54 +-
 contrib/libcbor/src/cbor/callbacks.c               | 153 ++--
 contrib/libcbor/src/cbor/callbacks.h               |  14 +-
 contrib/libcbor/src/cbor/common.c                  |  29 +-
 contrib/libcbor/src/cbor/common.h                  | 152 ++--
 contrib/libcbor/src/cbor/configuration.h.in        |   1 -
 contrib/libcbor/src/cbor/data.h                    |  11 +-
 contrib/libcbor/src/cbor/encoding.c                |  20 +-
 contrib/libcbor/src/cbor/encoding.h                | 103 ++-
 contrib/libcbor/src/cbor/floats_ctrls.c            |  64 +-
 contrib/libcbor/src/cbor/floats_ctrls.h            | 114 +--
 .../libcbor/src/cbor/internal/builder_callbacks.c  | 230 +++---
 .../libcbor/src/cbor/internal/builder_callbacks.h  |  12 +-
 contrib/libcbor/src/cbor/internal/encoders.c       |  28 +-
 contrib/libcbor/src/cbor/internal/encoders.h       |   5 +
 contrib/libcbor/src/cbor/internal/loaders.c        |   2 +-
 contrib/libcbor/src/cbor/internal/loaders.h        |   9 +-
 contrib/libcbor/src/cbor/internal/memory_utils.c   |  17 +-
 contrib/libcbor/src/cbor/internal/memory_utils.h   |  13 +-
 contrib/libcbor/src/cbor/internal/stack.c          |   6 +-
 contrib/libcbor/src/cbor/internal/stack.h          |  14 +-
 contrib/libcbor/src/cbor/internal/unicode.c        |   9 +-
 contrib/libcbor/src/cbor/internal/unicode.h        |   7 +-
 contrib/libcbor/src/cbor/ints.c                    |  59 +-
 contrib/libcbor/src/cbor/ints.h                    |  61 +-
 contrib/libcbor/src/cbor/maps.c                    |  21 +-
 contrib/libcbor/src/cbor/maps.h                    |  65 +-
 contrib/libcbor/src/cbor/serialization.c           | 276 +++++---
 contrib/libcbor/src/cbor/serialization.h           | 135 ++--
 contrib/libcbor/src/cbor/streaming.c               | 181 ++---
 contrib/libcbor/src/cbor/streaming.h               |  10 +-
 contrib/libcbor/src/cbor/strings.c                 |  39 +-
 contrib/libcbor/src/cbor/strings.h                 |  87 ++-
 contrib/libcbor/src/cbor/tags.c                    |  11 +-
 contrib/libcbor/src/cbor/tags.h                    |  35 +-
 contrib/libcbor/src/libcbor.pc.in                  |   4 +-
 contrib/libcbor/test/CMakeLists.txt                |  14 +-
 ...ype_4_encoders_test.c => array_encoders_test.c} |  31 +-
 contrib/libcbor/test/array_test.c                  | 222 ++++++
 contrib/libcbor/test/assertions.c                  |  32 +-
 contrib/libcbor/test/assertions.h                  |  20 +-
 contrib/libcbor/test/bad_inputs_test.c             |  43 +-
 ..._encoders_test.c => bytestring_encoders_test.c} |  20 +-
 .../test/{type_2_test.c => bytestring_test.c}      | 122 +++-
 contrib/libcbor/test/callbacks_test.c              | 374 +++++++++-
 contrib/libcbor/test/cbor_serialize_test.c         | 490 +++++++++++--
 contrib/libcbor/test/cbor_stream_decode_test.c     | 274 ++++++--
 contrib/libcbor/test/copy_test.c                   | 346 +++++++--
 contrib/libcbor/test/float_ctrl_encoders_test.c    | 213 ++++++
 .../test/{type_7_test.c => float_ctrl_test.c}      |  80 ++-
 contrib/libcbor/test/fuzz_test.c                   |  15 +-
 ...{type_5_encoders_test.c => map_encoders_test.c} |  21 +-
 contrib/libcbor/test/{type_5_test.c => map_test.c} | 120 +++-
 contrib/libcbor/test/memory_allocation_test.c      | 277 --------
 contrib/libcbor/test/memory_utils_test.c           |  59 ++
 ...pe_1_encoders_test.c => negint_encoders_test.c} |  49 +-
 .../libcbor/test/{type_1_test.c => negint_test.c}  |  40 +-
 contrib/libcbor/test/pretty_printer_test.c         |   9 +-
 contrib/libcbor/test/stack_over_limit_test.c       |  15 +-
 contrib/libcbor/test/stream_expectations.c         | 107 +--
 contrib/libcbor/test/stream_expectations.h         |  71 +-
 ...pe_3_encoders_test.c => string_encoders_test.c} |  21 +-
 .../libcbor/test/{type_3_test.c => string_test.c}  | 112 ++-
 ...{type_6_encoders_test.c => tag_encoders_test.c} |  15 +-
 contrib/libcbor/test/{type_6_test.c => tag_test.c} |  59 +-
 contrib/libcbor/test/test_allocator.c              |  89 +++
 contrib/libcbor/test/test_allocator.h              |  35 +
 contrib/libcbor/test/type_4_test.c                 | 127 ----
 contrib/libcbor/test/type_7_encoders_test.c        | 109 ---
 ...type_0_encoders_test.c => uint_encoders_test.c} |  46 +-
 .../libcbor/test/{type_0_test.c => uint_test.c}    |  58 +-
 contrib/libcbor/test/unicode_test.c                |  23 +-
 lib/libcbor/Makefile                               |   3 +-
 139 files changed, 5668 insertions(+), 2660 deletions(-)

diff --cc contrib/libcbor/.circleci/config.yml
index 000000000000,69371b67d624..69371b67d624
mode 000000,100644..100644
--- a/contrib/libcbor/.circleci/config.yml
+++ b/contrib/libcbor/.circleci/config.yml
diff --cc contrib/libcbor/.github/ISSUE_TEMPLATE/bug_report.md
index 000000000000,75997d8424cc..75997d8424cc
mode 000000,100644..100644
--- a/contrib/libcbor/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/contrib/libcbor/.github/ISSUE_TEMPLATE/bug_report.md
diff --cc contrib/libcbor/.github/PULL_REQUEST_TEMPLATE
index 000000000000,1174d56f9c7a..1174d56f9c7a
mode 000000,100644..100644
--- a/contrib/libcbor/.github/PULL_REQUEST_TEMPLATE
+++ b/contrib/libcbor/.github/PULL_REQUEST_TEMPLATE
diff --cc contrib/libcbor/.github/workflows/fuzz-pr.yml
index 000000000000,0e3c4fde4e02..0e3c4fde4e02
mode 000000,100644..100644
--- a/contrib/libcbor/.github/workflows/fuzz-pr.yml
+++ b/contrib/libcbor/.github/workflows/fuzz-pr.yml
diff --cc contrib/libcbor/.gitignore
index b6fe00f938ad,000000000000..61f88a874965
mode 100644,000000..100644
--- a/contrib/libcbor/.gitignore
+++ b/contrib/libcbor/.gitignore
@@@ -1,8 -1,0 +1,16 @@@
 +build
 +*~
 +nbproject
 +.idea
 +doxygen_docs
 +*/*.out
 +cmake-build-debug
 +venv
++**.DS_Store
++.vscode
++# No top-level requirements, see doc/source
++requirements.txt
++examples/bazel/bazel-bazel
++examples/bazel/bazel-bin
++examples/bazel/bazel-out
++examples/bazel/bazel-testlogs
diff --cc contrib/libcbor/Bazel.md
index 000000000000,9fa2081f58fc..9fa2081f58fc
mode 000000,100644..100644
--- a/contrib/libcbor/Bazel.md
+++ b/contrib/libcbor/Bazel.md
diff --cc contrib/libcbor/CMakeModules/JoinPaths.cmake
index 000000000000,c68d91b84dbc..c68d91b84dbc
mode 000000,100644..100644
--- a/contrib/libcbor/CMakeModules/JoinPaths.cmake
+++ b/contrib/libcbor/CMakeModules/JoinPaths.cmake
diff --cc contrib/libcbor/CONTRIBUTING.md
index 000000000000,000000000000..cc834d21a46b
new file mode 100644
--- /dev/null
+++ b/contrib/libcbor/CONTRIBUTING.md
@@@ -1,0 -1,0 +1,35 @@@
++# Contributing to libcbor
++
++libcbor is maintained by [@PJK](https://github.com/PJK) in his spare time on a best-effort basis.
++
++Community contributions are welcome as long as they align with the [project priorities](https://github.com/PJK/libcbor#main-features) and [goals](https://libcbor.readthedocs.io/en/latest/development.html#goals) and follow the guidelines described belows. 
++
++## Principles
++
++**Bug reports and questions:** Bug reports and specific technical questions are always welcome. Feel free to open an [issue](https://github.com/PJK/libcbor/issues).   
++
++**Incremental improvements:** Bug fixes (including build scripts, examples, test, typos, CI/CD config, etc.) and documentation improvements (fixes of typos, inaccuracies, out of date content, etc.) are always welcome. Feel free to open a [PR](https://github.com/PJK/libcbor/pulls).
++
++**New features:** I am looking to keep the scope of libcbor small. If you would like to add a feature, please open an issue with your proposal (or reach out to me privately) to discuss if the feature fits into libcbor before opening a PR.
++
++**Major changes:** Please open an issue with your proposal (or reach out to me privately) to discuss if the improvement fits into cbor before opening a PR.
++
++## Pull Request Process
++
++1. Ensure that all CI checks pass
++2. Check that the PR is complete and of good quality
++    - Include a descriptive summary of the change. If the PR addresses an open issue, please link it.
++    - Code changes: Add tests
++    - If necessary: Update documentation, including any links 
++3. Code changes: Update [the changelog](https://github.com/PJK/libcbor/blob/master/CHANGELOG.md). Do *not* change the version number.
++
++## Interactions
++
++I work on libcbor on a best effort basis. The typical response time is a few days. 
++
++If you do not receive a response in a few weeks, feel free to ping the PR or issue.
++
++## Resources
++
++- [Development documentation](https://libcbor.readthedocs.io/en/latest/development.html)
++
diff --cc contrib/libcbor/README.md
index cffae9191d01,000000000000..6d34ba9d4dcb
mode 100644,000000..100644
--- a/contrib/libcbor/README.md
+++ b/contrib/libcbor/README.md
@@@ -1,122 -1,0 +1,122 @@@
 +# [libcbor](https://github.com/PJK/libcbor)
 +
- [![Build Status](https://travis-ci.org/PJK/libcbor.svg?branch=master)](https://travis-ci.org/PJK/libcbor)
++[![CircleCI](https://circleci.com/gh/PJK/libcbor/tree/master.svg?style=svg)](https://circleci.com/gh/PJK/libcbor/tree/master)
 +[![Build status](https://ci.appveyor.com/api/projects/status/8kkmvmefelsxp5u2?svg=true)](https://ci.appveyor.com/project/PJK/libcbor)
 +[![Documentation Status](https://readthedocs.org/projects/libcbor/badge/?version=latest)](https://readthedocs.org/projects/libcbor/?badge=latest)
 +[![latest packaged version(s)](https://repology.org/badge/latest-versions/libcbor.svg)](https://repology.org/project/libcbor/versions)
 +[![codecov](https://codecov.io/gh/PJK/libcbor/branch/master/graph/badge.svg)](https://codecov.io/gh/PJK/libcbor)
 +
- **libcbor** is a C library for parsing and generating [CBOR](http://tools.ietf.org/html/rfc7049), the general-purpose schema-less binary data format.
++**libcbor** is a C library for parsing and generating [CBOR](https://tools.ietf.org/html/rfc7049), the general-purpose schema-less binary data format.
 +
 +## Main features
 + - Complete RFC conformance
 + - Robust C99 implementation
 + - Layered architecture offers both control and convenience
 + - Flexible memory management
 + - No shared global state - threading friendly
 + - Proper handling of UTF-8
 + - Full support for streams & incremental processing
 + - Extensive documentation and test suite
 + - No runtime dependencies, small footprint
 + 
 +## Getting started
 +
 +### Compile from source
 +
 +```bash
 +git clone https://github.com/PJK/libcbor
- cmake -DCMAKE_BUILD_TYPE=Release -DCBOR_CUSTOM_ALLOC=ON libcbor
++cmake -DCMAKE_BUILD_TYPE=Release libcbor
 +make
 +make install
 +```
 +
 +### Homebrew
 +
 +```bash
 +brew install libcbor
 +```
 +
 +### Ubuntu 18.04 and above
 +
 +```bash
 +sudo add-apt-repository universe
 +sudo apt-get install libcbor-dev
 +```
 +
 +### Fedora & RPM friends
 +
 +```bash
 +yum install libcbor-devel
 +```
 +
 +### Others 
 +
 +<details>
 +  <summary>Packaged libcbor is available from 15+ major repositories. Click here for more detail</summary>
 +  
 +  [![Packaging status](https://repology.org/badge/vertical-allrepos/libcbor.svg)](https://repology.org/project/libcbor/versions)
 +</details>
 +
 +## Usage example
 +
 +```c
 +#include <cbor.h>
 +#include <stdio.h>
 +
- int main(int argc, char * argv[])
- {
- 	/* Preallocate the map structure */
- 	cbor_item_t * root = cbor_new_definite_map(2);
- 	/* Add the content */
- 	cbor_map_add(root, (struct cbor_pair) {
- 		.key = cbor_move(cbor_build_string("Is CBOR awesome?")),
- 		.value = cbor_move(cbor_build_bool(true))
- 	});
- 	cbor_map_add(root, (struct cbor_pair) {
- 		.key = cbor_move(cbor_build_uint8(42)),
- 		.value = cbor_move(cbor_build_string("Is the answer"))
- 	});
- 	/* Output: `length` bytes of data in the `buffer` */
- 	unsigned char * buffer;
- 	size_t buffer_size,
- 		length = cbor_serialize_alloc(root, &buffer, &buffer_size);
- 
- 	fwrite(buffer, 1, length, stdout);
- 	free(buffer);
- 
- 	fflush(stdout);
- 	cbor_decref(&root);
++int main(void) {
++  /* Preallocate the map structure */
++  cbor_item_t* root = cbor_new_definite_map(2);
++  /* Add the content */
++  bool success = cbor_map_add(
++      root, (struct cbor_pair){
++                .key = cbor_move(cbor_build_string("Is CBOR awesome?")),
++                .value = cbor_move(cbor_build_bool(true))});
++  success &= cbor_map_add(
++      root, (struct cbor_pair){
++                .key = cbor_move(cbor_build_uint8(42)),
++                .value = cbor_move(cbor_build_string("Is the answer"))});
++  if (!success) return 1;
++  /* Output: `length` bytes of data in the `buffer` */
++  unsigned char* buffer;
++  size_t buffer_size;
++  cbor_serialize_alloc(root, &buffer, &buffer_size);
++
++  fwrite(buffer, 1, buffer_size, stdout);
++  free(buffer);
++
++  fflush(stdout);
++  cbor_decref(&root);
 +}
 +```
 +
 +## Documentation
 +Get the latest documentation at [libcbor.readthedocs.org](http://libcbor.readthedocs.org/)
 +
 +## Contributions
 +
- All bug reports and contributions are welcome. Please see https://github.com/PJK/libcbor for more info.
++Bug reports and contributions are welcome. Please see [CONTRIBUTING.md](https://github.com/PJK/libcbor/blob/master/CONTRIBUTING.md) for more info.
 +
 +Kudos to all the [contributors](https://github.com/PJK/libcbor/graphs/contributors)!
 +
 +## License
 +The MIT License (MIT)
 +
 +Copyright (c) Pavel Kalvoda, 2014-2020
 +
 +Permission is hereby granted, free of charge, to any person obtaining a copy
 +of this software and associated documentation files (the "Software"), to deal
 +in the Software without restriction, including without limitation the rights
 +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 +copies of the Software, and to permit persons to whom the Software is
 +furnished to do so, subject to the following conditions:
 +
 +The above copyright notice and this permission notice shall be included in all
 +copies or substantial portions of the Software.
 +
 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 +SOFTWARE.
diff --cc contrib/libcbor/doc/source/api/streaming_encoding.rst
index 000000000000,25100da9b5e0..25100da9b5e0
mode 000000,100644..100644
--- a/contrib/libcbor/doc/source/api/streaming_encoding.rst
+++ b/contrib/libcbor/doc/source/api/streaming_encoding.rst
diff --cc contrib/libcbor/examples/bazel/README.md
index 000000000000,455e2d38d3e5..455e2d38d3e5
mode 000000,100644..100644
--- a/contrib/libcbor/examples/bazel/README.md
+++ b/contrib/libcbor/examples/bazel/README.md
diff --cc contrib/libcbor/examples/bazel/WORKSPACE
index 000000000000,c7601f3035ff..c7601f3035ff
mode 000000,100644..100644
--- a/contrib/libcbor/examples/bazel/WORKSPACE
+++ b/contrib/libcbor/examples/bazel/WORKSPACE
diff --cc contrib/libcbor/examples/bazel/src/BUILD
index 000000000000,d3acb578398a..d3acb578398a
mode 000000,100644..100644
--- a/contrib/libcbor/examples/bazel/src/BUILD
+++ b/contrib/libcbor/examples/bazel/src/BUILD
diff --cc contrib/libcbor/examples/bazel/src/hello.cc
index 000000000000,5162d26e1b47..5162d26e1b47
mode 000000,100644..100644
--- a/contrib/libcbor/examples/bazel/src/hello.cc
+++ b/contrib/libcbor/examples/bazel/src/hello.cc
diff --cc contrib/libcbor/examples/bazel/src/hello.h
index 000000000000,3d50065cfdcf..3d50065cfdcf
mode 000000,100644..100644
--- a/contrib/libcbor/examples/bazel/src/hello.h
+++ b/contrib/libcbor/examples/bazel/src/hello.h
diff --cc contrib/libcbor/examples/bazel/src/hello_test.cc
index 000000000000,68d8633c8772..68d8633c8772
mode 000000,100644..100644
--- a/contrib/libcbor/examples/bazel/src/hello_test.cc
+++ b/contrib/libcbor/examples/bazel/src/hello_test.cc
diff --cc contrib/libcbor/examples/bazel/src/main.cc
index 000000000000,6c1e4f52a03a..6c1e4f52a03a
mode 000000,100644..100644
--- a/contrib/libcbor/examples/bazel/src/main.cc
+++ b/contrib/libcbor/examples/bazel/src/main.cc
diff --cc contrib/libcbor/examples/bazel/third_party/BUILD
index 000000000000,c4c443f1b562..c4c443f1b562
mode 000000,100644..100644
--- a/contrib/libcbor/examples/bazel/third_party/BUILD
+++ b/contrib/libcbor/examples/bazel/third_party/BUILD
diff --cc contrib/libcbor/examples/bazel/third_party/libcbor.BUILD
index 000000000000,45f4975b4fc8..45f4975b4fc8
mode 000000,100644..100644
--- a/contrib/libcbor/examples/bazel/third_party/libcbor.BUILD
+++ b/contrib/libcbor/examples/bazel/third_party/libcbor.BUILD
diff --cc contrib/libcbor/examples/bazel/third_party/libcbor/BUILD
index 000000000000,2ef8702fd308..2ef8702fd308
mode 000000,100644..100644
--- a/contrib/libcbor/examples/bazel/third_party/libcbor/BUILD
+++ b/contrib/libcbor/examples/bazel/third_party/libcbor/BUILD
diff --cc contrib/libcbor/examples/bazel/third_party/libcbor/cbor/cbor_export.h
index 000000000000,8bf3dea85c8f..8bf3dea85c8f
mode 000000,100644..100644
--- a/contrib/libcbor/examples/bazel/third_party/libcbor/cbor/cbor_export.h
+++ b/contrib/libcbor/examples/bazel/third_party/libcbor/cbor/cbor_export.h
diff --cc contrib/libcbor/examples/bazel/third_party/libcbor/cbor/configuration.h
index 000000000000,3472cf49d8fe..3472cf49d8fe
mode 000000,100644..100644
--- a/contrib/libcbor/examples/bazel/third_party/libcbor/cbor/configuration.h
+++ b/contrib/libcbor/examples/bazel/third_party/libcbor/cbor/configuration.h
diff --cc contrib/libcbor/examples/streaming_array.c
index 000000000000,d165e62b1c9e..d165e62b1c9e
mode 000000,100644..100644
--- a/contrib/libcbor/examples/streaming_array.c
+++ b/contrib/libcbor/examples/streaming_array.c
diff --cc contrib/libcbor/test/array_test.c
index 000000000000,1a241c051f2c..1a241c051f2c
mode 000000,100644..100644
--- a/contrib/libcbor/test/array_test.c
+++ b/contrib/libcbor/test/array_test.c
diff --cc contrib/libcbor/test/float_ctrl_encoders_test.c
index 000000000000,8940106d91d3..8940106d91d3
mode 000000,100644..100644
--- a/contrib/libcbor/test/float_ctrl_encoders_test.c
+++ b/contrib/libcbor/test/float_ctrl_encoders_test.c
diff --cc contrib/libcbor/test/memory_utils_test.c
index 000000000000,6cf07c7da934..6cf07c7da934
mode 000000,100644..100644
--- a/contrib/libcbor/test/memory_utils_test.c
+++ b/contrib/libcbor/test/memory_utils_test.c
diff --cc contrib/libcbor/test/test_allocator.c
index 000000000000,72ccf6591d25..72ccf6591d25
mode 000000,100644..100644
--- a/contrib/libcbor/test/test_allocator.c
+++ b/contrib/libcbor/test/test_allocator.c
diff --cc contrib/libcbor/test/test_allocator.h
index 000000000000,0e58454edbd6..0e58454edbd6
mode 000000,100644..100644
--- a/contrib/libcbor/test/test_allocator.h
+++ b/contrib/libcbor/test/test_allocator.h
diff --cc lib/libcbor/Makefile
index 455efdbfc8ee,000000000000..340d10fb896a
mode 100644,000000..100644
--- a/lib/libcbor/Makefile
+++ b/lib/libcbor/Makefile
@@@ -1,35 -1,0 +1,36 @@@
 +# $FreeBSD$
 +
 +PACKAGE=ssh
 +LIB=	cbor
 +PRIVATELIB=
 +
 +DIST=${SRCTOP}/contrib/libcbor
 +.PATH:	${DIST}/src
 +
- SRCS=	cbor.c
++SRCS=	allocators.c
++SRCS+=	cbor.c
 +SRCS+=	cbor/arrays.c
 +SRCS+=	cbor/bytestrings.c
 +SRCS+=	cbor/callbacks.c
 +SRCS+=	cbor/common.c
 +SRCS+=	cbor/encoding.c
 +SRCS+=	cbor/floats_ctrls.c
 +SRCS+=	cbor/ints.c
 +SRCS+=	cbor/maps.c
 +SRCS+=	cbor/serialization.c
 +SRCS+=	cbor/streaming.c
 +SRCS+=	cbor/strings.c
 +SRCS+=	cbor/tags.c
 +SRCS+=	cbor/internal/builder_callbacks.c
 +SRCS+=	cbor/internal/encoders.c
 +SRCS+=	cbor/internal/loaders.c
 +SRCS+=	cbor/internal/memory_utils.c
 +SRCS+=	cbor/internal/stack.c
 +SRCS+=	cbor/internal/unicode.c
 +
 +CFLAGS+= -I${DIST}/src -I${.CURDIR}
 +
 +WARNS?=	2
 +MAN=
 +
 +.include <bsd.lib.mk>