Github messages for voidlinux
 help / color / mirror / Atom feed
From: yoshiyoshyosh <yoshiyoshyosh@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] mhash: make boolean usage musl C++ portable.
Date: Sun, 10 Sep 2023 18:53:49 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-46005@inbox.vuxu.org> (raw)

[-- 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>"

             reply	other threads:[~2023-09-10 16:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-10 16:53 yoshiyoshyosh [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-46005@inbox.vuxu.org \
    --to=yoshiyoshyosh@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).