diff options
| author | Jack Nagel | 2013-11-08 22:45:03 -0600 |
|---|---|---|
| committer | Jack Nagel | 2013-11-08 22:45:56 -0600 |
| commit | c4839a616e0eaa7ff864c7c7838c8d14f42b8a2f (patch) | |
| tree | c7b2bc485310d0ba57f599f6198cffa59a59a61e /Library/Formula | |
| parent | ff3880763939eb79d41f0b760961360132a1792f (diff) | |
| download | homebrew-c4839a616e0eaa7ff864c7c7838c8d14f42b8a2f.tar.bz2 | |
libkml: fix compilation with clang and gcc 4.7+
Fixes #24069.
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/libkml.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Library/Formula/libkml.rb b/Library/Formula/libkml.rb index cb352c16a..c2e569f8d 100644 --- a/Library/Formula/libkml.rb +++ b/Library/Formula/libkml.rb @@ -12,6 +12,10 @@ class Libkml < Formula depends_on :libtool end + # Fix compilation with clang and gcc 4.7+ + # https://code.google.com/p/libkml/issues/detail?id=179 + def patches; DATA; end + def install if build.head? # The inreplace line below is only required until the patch in #issue 186 @@ -30,3 +34,17 @@ class Libkml < Formula system "make install" end end + +__END__ +diff --git a/src/kml/base/file_posix.cc b/src/kml/base/file_posix.cc +index 764ae55..8ee9892 100644 +--- a/src/kml/base/file_posix.cc ++++ b/src/kml/base/file_posix.cc +@@ -29,6 +29,7 @@ + #include "kml/base/file.h" + #include <stdlib.h> + #include <string.h> ++#include <unistd.h> + #include <sys/types.h> + #include <sys/stat.h> + |
