Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
46 lines (38 sloc) 1.53 KB
require 'formula'
class GnuShogi < Formula
url ''
homepage ''
md5 'a18eae93afc89bfd368ed5f6768be791'
def patches
# gcc 4.2.1 flags the following error
# In file included from attacks.c:32:
# gnushogi.h:144: error: conflicting types for ‘setlinebuf’
# /usr/include/stdio.h:351: error: previous declaration of ‘setlinebuf’ was here
# My patch fixes this by changing the declared return type of setlinebuf in
# gnushogi.h to int to match up with stdio.h's declaration
# It was returning void anyway, so unless something errantly relies on it not
# leaving something in the return register, this shouldn't break anything
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
system "make"
system "make", "install", "MANDIR=#{man6}", "INFODIR=#{info}"
diff --git a/gnushogi/gnushogi.h b/gnushogi/gnushogi.h
index 423a864..1d930c2 100644
--- a/gnushogi/gnushogi.h
+++ b/gnushogi/gnushogi.h
@@ -141,7 +141,7 @@ typedef unsigned long ULONG;
/* Not necessarily included in <stdio.h> */
-extern void setlinebuf(FILE *__stream);
+extern int setlinebuf(FILE *__stream);
#define RWA_ACC "r+"
Jump to Line
Something went wrong with that request. Please try again.