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 :^)
This commit is contained in:
Ali Mohammad Pur 2021-12-24 05:22:03 +03:30 committed by Ali Mohammad Pur
parent 49749e279a
commit f7b399da44
Notes: sideshowbarker 2024-07-17 22:14:16 +09:00
2 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,37 @@
From b36d25744e2db7989352ad48e00f4c7e87ed65c2 Mon Sep 17 00:00:00 2001
From: Ali Mohammad Pur <ali.mpfard@gmail.com>
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

View File

@ -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.