png2ico: fix build with recent clang
This project seems dead, but several people reported this issue so let's carry this tiny patch rather than remove it. Fixes Homebrew/homebrew#23497.
This commit is contained in:
parent
2ce53e3f0d
commit
3d0fb8d7a6
1 changed files with 17 additions and 0 deletions
|
@ -7,6 +7,9 @@ class Png2ico < Formula
|
|||
|
||||
depends_on :libpng
|
||||
|
||||
# Fix build with recent clang
|
||||
def patches; DATA; end
|
||||
|
||||
def install
|
||||
inreplace 'Makefile', 'g++', '$(CXX)'
|
||||
system "make", "CPPFLAGS=#{ENV.cxxflags} #{ENV.cppflags} #{ENV.ldflags}"
|
||||
|
@ -14,3 +17,17 @@ class Png2ico < Formula
|
|||
man1.install 'doc/png2ico.1'
|
||||
end
|
||||
end
|
||||
|
||||
__END__
|
||||
diff --git a/png2ico.cpp b/png2ico.cpp
|
||||
index 8fb87e4..9dedb97 100644
|
||||
--- a/png2ico.cpp
|
||||
+++ b/png2ico.cpp
|
||||
@@ -34,6 +34,7 @@ Notes about transparent and inverted pixels:
|
||||
#include <cstdio>
|
||||
#include <vector>
|
||||
#include <climits>
|
||||
+#include <cstdlib>
|
||||
|
||||
#if __GNUC__ > 2
|
||||
#include <ext/hash_map>
|
||||
|
|
Loading…
Reference in a new issue