add mutella (thanks to olli)
[openwrt/svn-archive/archive.git] / utils / smartmontools / patches / 001-compile-fix.patch
1 diff -urN smartmontools-5.37/configure.in smartmontools-5.37.new/configure.in
2 --- smartmontools-5.37/configure.in 2006-12-20 21:39:25.000000000 +0100
3 +++ smartmontools-5.37.new/configure.in 2007-01-26 11:37:41.000000000 +0100
4 @@ -76,18 +76,18 @@
5 AC_CHECK_FUNCS([uname])
6
7 # Check whether snprintf appends null char and returns expected length on overflow
8 -AH_TEMPLATE(HAVE_WORKING_SNPRINTF, [Define to 1 if the `snprintf' function is sane])
9 -AC_MSG_CHECKING([for working snprintf])
10 -AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[ char buf[]="ABCDEFGHI";
11 - int i=snprintf(buf,8,"12345678"); return !(!buf[7] && i==8); ]])],
12 - [libc_have_working_snprintf=yes],
13 - [libc_have_working_snprintf=no],
14 - [libc_have_working_snprintf=no])
15 -AC_SUBST(libc_have_working_snprintf)
16 -if test "$libc_have_working_snprintf" = "yes"; then
17 - AC_DEFINE(HAVE_WORKING_SNPRINTF)
18 -fi
19 -AC_MSG_RESULT([$libc_have_working_snprintf])
20 +#AH_TEMPLATE(HAVE_WORKING_SNPRINTF, [Define to 1 if the `snprintf' function is sane])
21 +#AC_MSG_CHECKING([for working snprintf])
22 +#AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[ char buf[]="ABCDEFGHI";
23 +# int i=snprintf(buf,8,"12345678"); return !(!buf[7] && i==8); ]])],
24 +# [libc_have_working_snprintf=yes],
25 +# [libc_have_working_snprintf=no],
26 +# [libc_have_working_snprintf=no])
27 +#AC_SUBST(libc_have_working_snprintf)
28 +#if test "$libc_have_working_snprintf" = "yes"; then
29 +# AC_DEFINE(HAVE_WORKING_SNPRINTF)
30 +#fi
31 +#AC_MSG_RESULT([$libc_have_working_snprintf])
32
33 # check for __attribute__((packed))
34 AH_TEMPLATE(HAVE_ATTR_PACKED, [Define to 1 if C++ compiler supports __attribute__((packed))])