The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / screen / 0005-avoid-identifying-as-SVR4.patch
diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/screen/0005-avoid-identifying-as-SVR4.patch b/cirros-testvm/src-cirros/buildroot-2015.05/package/screen/0005-avoid-identifying-as-SVR4.patch
new file mode 100644 (file)
index 0000000..10c08d2
--- /dev/null
@@ -0,0 +1,52 @@
+From: Maarten ter Huurne <maarten@treewalker.org>
+Date: Sun, 14 Sep 2014 11:16:58 +0200
+Subject: Avoid mis-identifying systems as SVR4
+
+My openSUSE 13.1 Linux system was detected as SVR4 because it had
+libelf installed. This leads to linking with libelf, even though no
+symbols from that library were actually used, and to a workaround for
+a buggy getlogin() being enabled.
+
+It is not documented which exact SVR4 system had the bug that the
+workaround was added for, so all I could do is make an educated guess
+at the #defines its compiler would be likely to set.
+
+Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
+---
+ configure.in | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index f78f81f..181b7f9 100644
+--- a/configure.in
++++ b/configure.in
+@@ -178,14 +178,24 @@ AC_EGREP_CPP(yes,
+ #endif
+ ], LIBS="$LIBS -lsocket -linet";seqptx=1)
++AC_CHECKING(SVR4)
++AC_EGREP_CPP(yes,
++[main () {
++#if defined(SVR4) || defined(__SVR4)
++  yes;
++#endif
++], AC_NOTE(- you have a SVR4 system) AC_DEFINE(SVR4) svr4=1)
++if test -n "$svr4" ; then
+ oldlibs="$LIBS"
+ LIBS="$LIBS -lelf"
+ AC_CHECKING(SVR4)
+ AC_TRY_LINK([#include <utmpx.h>
+ ],,
+-[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN),
+-[AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN))])]
++[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(BUGGYGETLOGIN),
++[AC_CHECK_HEADER(elf.h, AC_DEFINE(BUGGYGETLOGIN))])]
+ ,LIBS="$oldlibs")
++fi
++
+ AC_CHECK_HEADERS([stropts.h string.h strings.h])
+ AC_CHECKING(for Solaris 2.x)
+-- 
+1.8.4.5
+