app-crypt/mit-krb5: fix clang build due to ttyname redecl
authorZentaro Kavanagh <zentaro@google.com>
Wed, 16 Nov 2016 23:21:13 +0000 (18:21 -0500)
committerMike Frysinger <vapier@gentoo.org>
Wed, 16 Nov 2016 23:21:13 +0000 (18:21 -0500)
app-crypt/mit-krb5/files/mit-krb5-1.14.2-redeclared-ttyname.patch [new file with mode: 0644]
app-crypt/mit-krb5/mit-krb5-1.14.2.ebuild
app-crypt/mit-krb5/mit-krb5-1.14.3.ebuild
app-crypt/mit-krb5/mit-krb5-1.14.4.ebuild

diff --git a/app-crypt/mit-krb5/files/mit-krb5-1.14.2-redeclared-ttyname.patch b/app-crypt/mit-krb5/files/mit-krb5-1.14.2-redeclared-ttyname.patch
new file mode 100644 (file)
index 0000000..a76cd3a
--- /dev/null
@@ -0,0 +1,26 @@
+Fixes the redeclaration of ttyname which was preventing
+enabling clang fortify.
+
+The error was;
+
+main.c:858:15: error: redeclaration of 'ttyname' must have the 'overloadable' attribute
+    char *p, *ttyname();
+              ^
+/build/samus/usr/include/unistd.h:784:14: note: previous overload of function is here
+extern char *ttyname (int __fd) __THROW __CLANG_NO_MANGLE (ttyname);
+
+https://github.com/krb5/krb5/pull/568
+
+Patch by Zentaro Kavanagh <zentaro@google.com>
+
+--- clients/ksu/main.c
++++ clients/ksu/main.c
+@@ -855,7 +855,7 @@
+ 
+ static char * ontty()
+ {
+-    char *p, *ttyname();
++    char *p;
+     static char buf[MAXPATHLEN + 5];
+     int result;
+ 
index 60d7a5b162f90512257261da76f12f9a18eea492..8a3c7c30a4f1942e69acfaaf6ddbdb4352958a8c 100644 (file)
@@ -58,6 +58,7 @@ MULTILIB_CHOST_TOOLS=(
 src_prepare() {
        epatch "${FILESDIR}/${PN}-1.12_warn_cflags.patch"
        epatch "${FILESDIR}/${PN}-config_LDFLAGS.patch"
+       epatch "${FILESDIR}/${PN}-1.14.2-redeclared-ttyname.patch"
 
        eautoreconf
 }
index 4a050ddc01edbe35c5e6e59d47b83a0c13b7fc02..0a8a33547b964b1bcea62aa3a9a9d835f327db0a 100644 (file)
@@ -58,6 +58,7 @@ MULTILIB_CHOST_TOOLS=(
 src_prepare() {
        epatch "${FILESDIR}/${PN}-1.12_warn_cflags.patch"
        epatch "${FILESDIR}/${PN}-config_LDFLAGS.patch"
+       epatch "${FILESDIR}/${PN}-1.14.2-redeclared-ttyname.patch"
 
        eautoreconf
 }
index 9e3078865792d39d2671454c632430f21d415253..0eff67b0c128f37d131c6675fcf2cdbd93434428 100644 (file)
@@ -58,6 +58,7 @@ MULTILIB_CHOST_TOOLS=(
 src_prepare() {
        epatch "${FILESDIR}/${PN}-1.12_warn_cflags.patch"
        epatch "${FILESDIR}/${PN}-config_LDFLAGS.patch"
+       epatch "${FILESDIR}/${PN}-1.14.2-redeclared-ttyname.patch"
 
        # Make sure we always use the system copies.
        rm -rf util/{et,ss,verto}