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
1 From: Maarten ter Huurne <maarten@treewalker.org>
2 Date: Sun, 14 Sep 2014 11:16:58 +0200
3 Subject: Avoid mis-identifying systems as SVR4
4
5 My openSUSE 13.1 Linux system was detected as SVR4 because it had
6 libelf installed. This leads to linking with libelf, even though no
7 symbols from that library were actually used, and to a workaround for
8 a buggy getlogin() being enabled.
9
10 It is not documented which exact SVR4 system had the bug that the
11 workaround was added for, so all I could do is make an educated guess
12 at the #defines its compiler would be likely to set.
13
14 Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
15 ---
16  configure.in | 14 ++++++++++++--
17  1 file changed, 12 insertions(+), 2 deletions(-)
18
19 diff --git a/configure.in b/configure.in
20 index f78f81f..181b7f9 100644
21 --- a/configure.in
22 +++ b/configure.in
23 @@ -178,14 +178,24 @@ AC_EGREP_CPP(yes,
24  #endif
25  ], LIBS="$LIBS -lsocket -linet";seqptx=1)
26  
27 +AC_CHECKING(SVR4)
28 +AC_EGREP_CPP(yes,
29 +[main () {
30 +#if defined(SVR4) || defined(__SVR4)
31 +  yes;
32 +#endif
33 +], AC_NOTE(- you have a SVR4 system) AC_DEFINE(SVR4) svr4=1)
34 +if test -n "$svr4" ; then
35  oldlibs="$LIBS"
36  LIBS="$LIBS -lelf"
37  AC_CHECKING(SVR4)
38  AC_TRY_LINK([#include <utmpx.h>
39  ],,
40 -[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN),
41 -[AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN))])]
42 +[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(BUGGYGETLOGIN),
43 +[AC_CHECK_HEADER(elf.h, AC_DEFINE(BUGGYGETLOGIN))])]
44  ,LIBS="$oldlibs")
45 +fi
46 +
47  AC_CHECK_HEADERS([stropts.h string.h strings.h])
48  
49  AC_CHECKING(for Solaris 2.x)
50 -- 
51 1.8.4.5
52