From f7b399da442f03822da7d61a02bf2f879ad6d417 Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Fri, 24 Dec 2021 05:22:03 +0330 Subject: Ports: Fix the conflicting types issue in the cmake port This patch is pending upstream, but until then, let's keep it locally to make the port work :^) --- ...heck-for-HAVE_SIZEOF_SSIZE_T-and-not-HAVE.patch | 37 ++++++++++++++++++++++ Ports/cmake/patches/ReadMe.md | 10 ++++++ 2 files changed, 47 insertions(+) create mode 100644 Ports/cmake/patches/0001-cmnghttp2-check-for-HAVE_SIZEOF_SSIZE_T-and-not-HAVE.patch diff --git a/Ports/cmake/patches/0001-cmnghttp2-check-for-HAVE_SIZEOF_SSIZE_T-and-not-HAVE.patch b/Ports/cmake/patches/0001-cmnghttp2-check-for-HAVE_SIZEOF_SSIZE_T-and-not-HAVE.patch new file mode 100644 index 0000000000..0880831021 --- /dev/null +++ b/Ports/cmake/patches/0001-cmnghttp2-check-for-HAVE_SIZEOF_SSIZE_T-and-not-HAVE.patch @@ -0,0 +1,37 @@ +From b36d25744e2db7989352ad48e00f4c7e87ed65c2 Mon Sep 17 00:00:00 2001 +From: Ali Mohammad Pur +Date: Fri, 24 Dec 2021 05:13:08 +0330 +Subject: [PATCH] cmnghttp2: check for HAVE_SIZEOF_SSIZE_T and not HAVE_SSIZE_T + +The `check_size_type(ssize_t SIZEOF_SSIZE_T` call in cmcurl (referenced +by the comment above, which also references some other variables that +no longer seem to be used) defines HAVE_SIZEOF_SSIZE_T and not +HAVE_SSIZE_T. +The HAVE_SSIZE_T variable *does* get defined, but via the +`CHECK_SIZE_TYPE(ssize_t SSIZE_T)` call in cmlibarchive, which gets +configured *after* cmnghttp2, and so the first configure leads to an +invalid cmnghttp2/config.h file. +--- + Utilities/cmnghttp2/CMakeLists.txt | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/Utilities/cmnghttp2/CMakeLists.txt b/Utilities/cmnghttp2/CMakeLists.txt +index 3bc2778e..7e8bf99b 100644 +--- a/Utilities/cmnghttp2/CMakeLists.txt ++++ b/Utilities/cmnghttp2/CMakeLists.txt +@@ -7,10 +7,8 @@ elseif(CMAKE_C_COMPILER_ID STREQUAL "PathScale") + endif() + + # Re-use some check result cache entries from cmcurl: +-# * HAVE_ARPA_INET_H +-# * HAVE_NETINET_IN_H +-# * HAVE_SSIZE_T +-if(NOT HAVE_SSIZE_T) ++# * HAVE_SIZEOF_SSIZE_T ++if(NOT HAVE_SIZEOF_SSIZE_T) + set(ssize_t KWIML_INT_intptr_t) + endif() + configure_file(cmakeconfig.h.in config.h) +-- +2.34.1 + diff --git a/Ports/cmake/patches/ReadMe.md b/Ports/cmake/patches/ReadMe.md index fa92ec0439..9018ea2e6b 100644 --- a/Ports/cmake/patches/ReadMe.md +++ b/Ports/cmake/patches/ReadMe.md @@ -1,5 +1,15 @@ # Patches for CMake (and submodules) on SerenityOS +## `0001-cmnghttp2-check-for-HAVE_SIZEOF_SSIZE_T-and-not-HAVE.patch` + +Fixes an issue where the first configure of cmake would generate an invalid config.h file somewhere, leading to the first run of `./package.sh` failing due to what `0016-conflicting-0.patch` and `0017-conflicting-1.patch` attempt to fix. + +### Status +- [ ] Local? +- [X] Should be merged to upstream? +- [ ] Resolves issues(s) with our side of things +- [ ] Hack + ## `0010-don-t-use-siginfo.patch` We don't support SIGINFO. This patch removes uses of SIGINFO. -- cgit v1.2.3