unbreak i386 by building the generic version, not mmx

fix some time_t and missing prototype issues
This commit is contained in:
sthen
2026-06-05 11:16:50 +00:00
parent 114f4ae0a0
commit 57c7228a86
3 changed files with 73 additions and 6 deletions
+3 -6
View File
@@ -1,9 +1,10 @@
BROKEN-powerpc64 = non-portable altivec / gcc-isms
BROKEN-powerpc64= non-portable altivec / gcc-isms
COMMENT= hashcash anti-spam / denial of service counter-measure tool
DISTNAME= hashcash-1.22
CATEGORIES= mail
REVISION= 1
CATEGORIES= mail
HOMEPAGE= http://www.hashcash.org/
@@ -17,11 +18,7 @@ WANTLIB= c
SITES= ${HOMEPAGE}/source/
EXTRACT_SUFX= .tgz
.if ${MACHINE_ARCH} == "i386"
ALL_TARGET= x86
.else
ALL_TARGET= generic
.endif
NO_TEST= Yes
+12
View File
@@ -0,0 +1,12 @@
Index: getopt.c
--- getopt.c.orig
+++ getopt.c
@@ -156,7 +156,7 @@ static enum
REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
} ordering;
-#ifdef __GNU_LIBRARY__
+#if defined(_GNU_LIBRARY__) || defined(__OpenBSD__)
/* We want to avoid inclusion of string.h with non-GNU libraries
because there are many ways it can cause trouble.
On some systems, it contains special magic macros that don't work
+58
View File
@@ -0,0 +1,58 @@
Index: hashcash.c
--- hashcash.c.orig
+++ hashcash.c
@@ -569,9 +569,9 @@ int main( int argc, char* argv[] )
}
if ( anon_flag ) {
- VPRINTF( stderr, "anon period: %ld seconds\n",
- (long)anon_period );
- VPRINTF( stderr, "adding: %ld seconds\n", anon_random );
+ VPRINTF( stderr, "anon period: %lld seconds\n",
+ (long long)anon_period );
+ VPRINTF( stderr, "adding: %lld seconds\n", (long long)anon_random );
}
VPRINTF( stderr, "tries: %.0f", tries_taken );
@@ -860,8 +860,8 @@ int main( int argc, char* argv[] )
if ( left_flag || verbose_flag ) {
QPRINTF( stderr, "valid: " );
if ( valid_for > 0 ) {
- QPRINTF( stderr, "for %ld seconds\n",
- (long)valid_for );
+ QPRINTF( stderr, "for %lld seconds\n",
+ (long long)valid_for );
if ( name_flag || width_flag ) {
PPUTS( stdout, " " );
}
@@ -877,22 +877,22 @@ int main( int argc, char* argv[] )
PPUTS( stdout, "0" );
break;
case HASHCASH_VALID_IN_FUTURE:
- QPRINTF( stderr, "in %ld seconds\n",
- token_time-(now_time+grace_period) );
+ QPRINTF( stderr, "in %lld seconds\n",
+ (long long)token_time-(now_time+grace_period) );
if ( name_flag || width_flag ) {
PPUTS( stdout, " " );
}
- PPRINTF( stdout, "+%ld",
- token_time-(now_time+grace_period) );
+ PPRINTF( stdout, "+%lld",
+ (long long)token_time-(now_time+grace_period) );
break;
case HASHCASH_EXPIRED:
- QPRINTF( stderr, "expired %ld seconds ago\n",
- now_time-(expiry_time+grace_period) );
+ QPRINTF( stderr, "expired %lld seconds ago\n",
+ (long long)now_time-(expiry_time+grace_period) );
if ( name_flag || width_flag ) {
PPUTS( stdout, " " );
}
- PPRINTF( stdout, "-%ld",
- now_time-(expiry_time+grace_period) );
+ PPRINTF( stdout, "-%lld",
+ (long long)now_time-(expiry_time+grace_period) );
break;
default:
QPRINTF( stderr, "not valid\n" );