Merge branch 'master' of github.com:sahlberg/libiscsi

This commit is contained in:
Ronnie Sahlberg
2014-09-18 11:57:32 -07:00
2 changed files with 6 additions and 13 deletions

View File

@@ -91,25 +91,14 @@ if test x"$libiscsi_cv_HAVE_SOCKADDR_IN6" = x"yes"; then
AC_DEFINE(HAVE_SOCKADDR_IN6,1,[Whether we have IPv6 support]) AC_DEFINE(HAVE_SOCKADDR_IN6,1,[Whether we have IPv6 support])
fi fi
AC_MSG_CHECKING(whether libcunit is available) AC_MSG_CHECKING(whether libcunit is available)
ac_save_CFLAGS="$CFLAGS" ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GLIB_CFLAGS" CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$GLIB_LIBS $LIBS -lcunit" LIBS="$GLIB_LIBS $LIBS -lcunit"
AC_TRY_RUN([ AC_TRY_LINK([
/*
* Just see if we can compile/link with libcunit
*/
#include <CUnit/CUnit.h> #include <CUnit/CUnit.h>
], [], [ac_cv_have_cunit=yes], [ac_cv_have_cunit=no])
int main(int argc, const char *argv[])
{
return 0;
}
], ac_cv_have_cunit=yes, ac_cv_have_cunit=no,
[echo $ac_n "compile with CUNIT. Assuming OK... $ac_c"
ac_cv_have_cunit=yes])
CFLAGS="$ac_save_CFLAGS" CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS" LIBS="$ac_save_LIBS"
if test "$ac_cv_have_cunit" = yes ; then if test "$ac_cv_have_cunit" = yes ; then

View File

@@ -543,6 +543,7 @@ int dup2(int oldfd, int newfd)
return real_dup2(oldfd, newfd); return real_dup2(oldfd, newfd);
} }
#if defined(_LARGEFILE64_SOURCE) && _FILE_OFFSET_BITS != 64
int (*real_fxstat64)(int ver, int fd, struct stat64 *buf); int (*real_fxstat64)(int ver, int fd, struct stat64 *buf);
@@ -591,6 +592,7 @@ int __xstat64(int ver, const char *path, struct stat64 *buf)
return __lxstat64(ver, path, buf); return __lxstat64(ver, path, buf);
} }
#endif
static void __attribute__((constructor)) _init(void) static void __attribute__((constructor)) _init(void)
{ {
@@ -669,6 +671,7 @@ static void __attribute__((constructor)) _init(void)
exit(10); exit(10);
} }
#if defined(_LARGEFILE64_SOURCE) && _FILE_OFFSET_BITS != 64
real_fxstat64 = dlsym(RTLD_NEXT, "__fxstat64"); real_fxstat64 = dlsym(RTLD_NEXT, "__fxstat64");
if (real_fxstat64 == NULL) { if (real_fxstat64 == NULL) {
LD_ISCSI_DPRINTF(0,"Failed to dlsym(__fxstat64)"); LD_ISCSI_DPRINTF(0,"Failed to dlsym(__fxstat64)");
@@ -683,4 +686,5 @@ static void __attribute__((constructor)) _init(void)
if (real_xstat64 == NULL) { if (real_xstat64 == NULL) {
LD_ISCSI_DPRINTF(0,"Failed to dlsym(__xstat64)"); LD_ISCSI_DPRINTF(0,"Failed to dlsym(__xstat64)");
} }
#endif
} }