freebsd-ports/games/bsdgames/files/patch-dfly
Martin Wilke 858884a7f0 - Update to 2.4
PR:		140478
Submitted by:	Ulrich Spoerlein <uqs@spoerlein.net> (maintainer)
2009-11-21 22:00:34 +00:00

40 lines
710 B
Text

--- ./cribbage/instr.c
+++ ./cribbage/instr.c
@@ -51,7 +51,11 @@ void
instructions(void)
{
struct stat sb;
+#ifdef __DragonFly__
union wait pstat;
+#else
+ int pstat;
+#endif
pid_t pid;
const char *pager, *path;
@@ -77,7 +81,11 @@ instructions(void)
do {
pid = waitpid(pid, (int *)&pstat, 0);
} while (pid == -1 && errno == EINTR);
+#ifdef __DragonFly__
if (pid == -1 || pstat.w_status)
+#else
+ if (pid == -1 || WEXITSTATUS(pstat) || WTERMSIG(pstat))
+#endif
exit(1);
}
}
--- ./sail/pl_1.c
+++ ./sail/pl_1.c
@@ -122,7 +122,11 @@ choke(void)
void
child(void)
{
+#ifdef __DragonFly__
union wait status;
+#else
+ int status;
+#endif
int pid;
signal(SIGCHLD, SIG_IGN);