Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] mhash: make boolean usage musl C++ portable.
@ 2023-09-10 16:53 yoshiyoshyosh
  2023-09-10 16:58 ` [PR PATCH] [Updated] " yoshiyoshyosh
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: yoshiyoshyosh @ 2023-09-10 16:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 880 bytes --]

There is a new pull request by yoshiyoshyosh against master on the void-packages repository

https://github.com/yoshiyoshyosh/void-packages mhash
https://github.com/void-linux/void-packages/pull/46005

mhash: make boolean usage musl C++ portable.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64-glibc`)
- I built this PR locally for these architectures:
  - `x86_64-musl` (crossbuild)
  - `i686` (crossbuild)

mhash uses `_Bool` directly for `#define mhash_boolean _Bool`. [musl C++ doesn't define `_Bool`](https://www.openwall.com/lists/musl/2017/07/28/1), so any C++ projects that include it will fail to build on musl. This fixes that without impacting any C projects

A patch file from https://github.com/void-linux/void-packages/pull/46005.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mhash-46005.patch --]
[-- Type: text/x-diff, Size: 1530 bytes --]

From 7d245e30cdc382fed866b96abf4af446bebbf0b1 Mon Sep 17 00:00:00 2001
From: yosh <yosh-git@riseup.net>
Date: Sun, 10 Sep 2023 12:28:33 -0400
Subject: [PATCH] mhash: make boolean usage musl C++ portable.

---
 srcpkgs/mhash/patches/fix-cpp-bools.patch | 21 +++++++++++++++++++++
 srcpkgs/mhash/template                    |  2 +-
 2 files changed, 22 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/mhash/patches/fix-cpp-bools.patch

diff --git a/srcpkgs/mhash/patches/fix-cpp-bools.patch b/srcpkgs/mhash/patches/fix-cpp-bools.patch
new file mode 100644
index 0000000000000..418d25c7207e1
--- /dev/null
+++ b/srcpkgs/mhash/patches/fix-cpp-bools.patch
@@ -0,0 +1,21 @@
+--- a/include/mutils/mutils.h
++++ b/include/mutils/mutils.h
+@@ -21,6 +21,9 @@
+ #if !defined(__MUTILS_H)
+ #define __MUTILS_H
+ 
++#ifndef __cplusplus
++#include <stdbool.h>
++#endif
+ #include <mutils/mincludes.h>
+ 
+ #if defined(const)
+@@ -97,7 +100,7 @@ typedef unsigned char mutils_word8;
+  */
+ 
+ #if defined(HAVE__BOOL)
+-#define mutils_boolean _Bool
++#define mutils_boolean bool
+ #else
+ typedef char mutils_boolean;
+ #endif
diff --git a/srcpkgs/mhash/template b/srcpkgs/mhash/template
index 6f753713a513d..aa2145fb39df7 100644
--- a/srcpkgs/mhash/template
+++ b/srcpkgs/mhash/template
@@ -1,7 +1,7 @@
 # Template file for 'mhash'
 pkgname=mhash
 version=0.9.9.9
-revision=1
+revision=2
 build_style=gnu-configure
 short_desc="Uniform interface to a large number of hash algorithms"
 maintainer="Andrew Benson <abenson+void@gmail.com>"

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-09-10 20:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-10 16:53 [PR PATCH] mhash: make boolean usage musl C++ portable yoshiyoshyosh
2023-09-10 16:58 ` [PR PATCH] [Updated] " yoshiyoshyosh
2023-09-10 17:03 ` yoshiyoshyosh
2023-09-10 17:53 ` yoshiyoshyosh
2023-09-10 18:10 ` [PR PATCH] [Updated] " yoshiyoshyosh
2023-09-10 18:13 ` yoshiyoshyosh
2023-09-10 19:53 ` yoshiyoshyosh
2023-09-10 19:55 ` yoshiyoshyosh
2023-09-10 20:24 ` [PR PATCH] [Merged]: " classabbyamp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).