Skip to content

Commit

Permalink
libmhash: make boolean usage libc++ portable
Browse files Browse the repository at this point in the history
  • Loading branch information
licy183 committed Aug 23, 2024
1 parent ecceef3 commit 86a9b7c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/libmhash/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="A thread-safe hash library which provides a uniform inte
TERMUX_PKG_LICENSE="LGPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.9.9.9
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://downloads.sourceforge.net/sourceforge/mhash/mhash-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=56521c52a9033779154432d0ae47ad7198914785265e1f570cee21ab248dfef0
TERMUX_PKG_BREAKS="libmhash-dev"
Expand Down
23 changes: 23 additions & 0 deletions packages/libmhash/libcxx.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
https://github.com/void-linux/void-packages/pull/46005

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

0 comments on commit 86a9b7c

Please sign in to comment.