Bugfix on geomview - compile fails due to wrong dirfd macro. #14436

Closed
wants to merge 1 commit into from
View
18 Library/Formula/geomview.rb
@@ -8,10 +8,28 @@ class Geomview < Formula
depends_on :x11
depends_on 'lesstif'
+ def patches
+ DATA
+ end
+
def install
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make install"
end
end
+
+__END__
+diff --git a/src/bin/animate/glob.c b/src/bin/animate/glob.c
+index f573f9c..2d80834 100644
+--- a/src/bin/animate/glob.c
++++ b/src/bin/animate/glob.c
+@@ -41,7 +41,7 @@ static char sccsid[] = "@(#)glob.c 5.7 (Berkeley) 12/14/88";
+ #include <errno.h>
+ #include <pwd.h>
+
+-#if !defined(dirfd) && !defined(__GLIBC__) && !defined(__linux__) && !defined(__FreeBSD__) && !defined(__CYGWIN__)
++#if !defined(dirfd) && !defined(__APPLE__) && !defined(__GLIBC__) && !defined(__linux__) && !defined(__FreeBSD__) && !defined(__CYGWIN__)
+ #define dirfd(dirp) ((dirp)->dd_fd)
+ #endif