Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Feb 2019 19:29:37 +0000 (UTC)
From:      Vasil Dimov <vd@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r492383 - head/net-p2p/qtum/files
Message-ID:  <201902071929.x17JTb4k013824@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: vd
Date: Thu Feb  7 19:29:36 2019
New Revision: 492383
URL: https://svnweb.freebsd.org/changeset/ports/492383

Log:
  net-p2p/qtum: fix compilation on big-endian machines
  
  PR:		235358
  Submitted by:	Piotr Kubaj <pkubaj@anongoth.pl>

Added:
  head/net-p2p/qtum/files/
  head/net-p2p/qtum/files/patch-src__cpp-ethereum__libethash__endian.h   (contents, props changed)
  head/net-p2p/qtum/files/patch-src__cpp-ethereum__libethash__internal.c   (contents, props changed)

Added: head/net-p2p/qtum/files/patch-src__cpp-ethereum__libethash__endian.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/qtum/files/patch-src__cpp-ethereum__libethash__endian.h	Thu Feb  7 19:29:36 2019	(r492383)
@@ -0,0 +1,36 @@
+--- src/cpp-ethereum/libethash/endian.h.orig	2018-07-06 00:22:11.000000000 +0200
++++ src/cpp-ethereum/libethash/endian.h	2019-02-07 09:09:17.097747000 +0100
+@@ -55,20 +55,20 @@
+ 
+ #define fix_endian32(dst_, src_) dst_ = ethash_swap_u32(src_)
+ #define fix_endian32_same(val_) val_ = ethash_swap_u32(val_)
+-#define fix_endian64(dst_, src_) dst_ = ethash_swap_u64(src_
++#define fix_endian64(dst_, src_) dst_ = ethash_swap_u64(src_)
+ #define fix_endian64_same(val_) val_ = ethash_swap_u64(val_)
+-#define fix_endian_arr32(arr_, size_)			\
+-	do {										\
+-	for (unsigned i_ = 0; i_ < (size_), ++i_) { \
+-		arr_[i_] = ethash_swap_u32(arr_[i_]);	\
+-	}											\
+-	while (0)
+-#define fix_endian_arr64(arr_, size_)			\
+-	do {										\
+-	for (unsigned i_ = 0; i_ < (size_), ++i_) { \
+-		arr_[i_] = ethash_swap_u64(arr_[i_]);	\
+-	}											\
+-	while (0)									\
++#define fix_endian_arr32(arr_, size_)					\
++	do {								\
++		for (unsigned i_ = 0; i_ < (size_); ++i_) {		\
++			(arr_)[i_] = ethash_swap_u32((arr_)[i_]);	\
++		}							\
++	} while (0)
++#define fix_endian_arr64(arr_, size_)					\
++	do {								\
++		for (unsigned i_ = 0; i_ < (size_); ++i_) {		\
++			(arr_)[i_] = ethash_swap_u64((arr_)[i_]);	\
++		}							\
++	} while (0)
+ 
+ #else
+ # error "endian not supported"

Added: head/net-p2p/qtum/files/patch-src__cpp-ethereum__libethash__internal.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/qtum/files/patch-src__cpp-ethereum__libethash__internal.c	Thu Feb  7 19:29:36 2019	(r492383)
@@ -0,0 +1,11 @@
+--- src/cpp-ethereum/libethash/internal.c.orig	2019-02-07 09:02:35.787808000 +0100
++++ src/cpp-ethereum/libethash/internal.c	2019-02-07 09:06:32.651306000 +0100
+@@ -328,7 +328,7 @@
+ void ethash_quick_hash(
+ 	ethash_h256_t* return_hash,
+ 	ethash_h256_t const* header_hash,
+-	uint64_t const nonce,
++	uint64_t nonce,
+ 	ethash_h256_t const* mix_hash
+ )
+ {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902071929.x17JTb4k013824>