From 8ac0cc78a27c854d82b22a6e323a55b6c78f2b44 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Wed, 22 Oct 2014 19:38:53 -0500 Subject: [PATCH] gnutls: fix compilation on 10.7 Fixes Homebrew/homebrew#33470. --- Formula/gnutls.rb | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/Formula/gnutls.rb b/Formula/gnutls.rb index fa664618cd..25287e4e89 100644 --- a/Formula/gnutls.rb +++ b/Formula/gnutls.rb @@ -29,8 +29,8 @@ class Gnutls < Formula cause "Undefined symbols when linking" end - # Fix use of stdnoreturn header on Lion - # https://www.gitorious.org/gnutls/gnutls/commit/9d2a2d17c0e483f056f98084955fba82b166bd56 + # Fix libopts Makefile.in, corresponds to upstream commit + # https://gitorious.org/gnutls/gnutls/commit/db3f46aeca90f6dce42592dd723a15f988264852 patch :DATA def install @@ -62,21 +62,16 @@ class Gnutls < Formula end __END__ ---- a/src/libopts/autoopts.h -+++ b/src/libopts/autoopts.h -@@ -32,7 +32,14 @@ - - #ifndef AUTOGEN_AUTOOPTS_H - #define AUTOGEN_AUTOOPTS_H --#include -+ -+#ifdef HAVE_STDNORETURN_H -+# include -+#else -+# ifndef noreturn -+# define noreturn -+# endif -+#endif - - #define AO_NAME_LIMIT 127 - #define AO_NAME_SIZE ((size_t)(AO_NAME_LIMIT + 1)) +diff --git a/src/libopts/Makefile.in b/src/libopts/Makefile.in +index 3be797a..8e6d3eb 100644 +--- a/src/libopts/Makefile.in ++++ b/src/libopts/Makefile.in +@@ -1546,7 +1546,7 @@ uninstall-am: + tags tags-am uninstall uninstall-am + + +-+_NORETURN_H=$(srcdir)/compat/_Noreturn.h ++_NORETURN_H=$(srcdir)/compat/_Noreturn.h + @GL_GENERATE_STDNORETURN_H_TRUE@stdnoreturn.h: stdnoreturn.in.h $(top_builddir)/config.status $(_NORETURN_H) + @GL_GENERATE_STDNORETURN_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ + @GL_GENERATE_STDNORETURN_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \