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