git: da36f675a13e - 2026Q1 - games/xpipeman: use portable fileno() instead of (*FILE)->_file
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 10 Feb 2026 15:42:25 UTC
The branch 2026Q1 has been updated by fuz:
URL: https://cgit.FreeBSD.org/ports/commit/?id=da36f675a13eceac6908d1ec04ee938a508eac64
commit da36f675a13eceac6908d1ec04ee938a508eac64
Author: Kristofer Peterson <kris@tranception.com>
AuthorDate: 2026-02-04 20:24:55 +0000
Commit: Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2026-02-10 15:42:12 +0000
games/xpipeman: use portable fileno() instead of (*FILE)->_file
PR: 292939, 291610
MFH: 2026Q1
(cherry picked from commit 003fed6b7b152ddf56b71d18380432a9b24f5b06)
---
games/xpipeman/Makefile | 2 +-
games/xpipeman/files/patch-score.c | 27 +++++++++++++++++++++++++--
2 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/games/xpipeman/Makefile b/games/xpipeman/Makefile
index 32e0873a229f..a99d2f1cf02e 100644
--- a/games/xpipeman/Makefile
+++ b/games/xpipeman/Makefile
@@ -1,6 +1,6 @@
PORTNAME= xpipeman
PORTVERSION= 1.5
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= games
MASTER_SITES= SUNSITE/games/strategy
DISTNAME= ${PORTNAME}
diff --git a/games/xpipeman/files/patch-score.c b/games/xpipeman/files/patch-score.c
index fe30359ded31..c1334f3773f6 100644
--- a/games/xpipeman/files/patch-score.c
+++ b/games/xpipeman/files/patch-score.c
@@ -11,7 +11,7 @@
#include "xpipeman.h"
/*----------------------------------------------------------------------*/
-@@ -64,13 +65,12 @@ typedef struct {
+@@ -64,13 +65,12 @@ static SCORE scores[MAXSCORES];
static SCORE scores[MAXSCORES];
@@ -26,7 +26,16 @@
/*----------------------------------------------------------------------*/
-@@ -100,8 +100,8 @@ load_scores()
+@@ -87,7 +87,7 @@ check_score(current_score,level)
+ }
+ if(scorefile) {
+ #ifndef SYSV
+- flock(scorefile->_file, LOCK_UN);
++ flock(fileno(scorefile), LOCK_UN);
+ #endif
+ fclose(scorefile);
+ show_scores();
+@@ -100,12 +100,12 @@ load_scores()
{
int i = 0;
@@ -37,6 +46,11 @@
return;
}
#ifndef SYSV
+- flock(scorefile->_file, LOCK_EX);
++ flock(fileno(scorefile), LOCK_EX);
+ #endif
+ while( fgets(scores[i].score,6,scorefile) /* get score */
+ && fgets(scores[i].name,26,scorefile) /* get name */
@@ -198,7 +198,7 @@ static Arg arglist_popdown[] = {
@@ -46,3 +60,12 @@
popdown_callback(w, closure, call_data)
Widget w;
caddr_t closure;
+@@ -281,7 +281,7 @@ show_scores_callback()
+
+ if(scorefile) {
+ #ifndef SYSV
+- flock(scorefile->_file, LOCK_UN);
++ flock(fileno(scorefile), LOCK_UN);
+ #endif
+ fclose(scorefile);
+ show_scores();