problems building on solaris 2.6
Mark D. Baushke
mdb at juniper.net
Sat Oct 27 12:03:29 EST 2001
Hi Ben,
The following patch seems to fix the problem for my Solaris 2.6 system
which seems to need to have _LARGEFILE64_SOURCE defined if a
'#define _FILE_OFFSET_BITS 64' is added to the config.h file.
It would be nice if this were handled as a part of the
AC_SYS_LARGEFILE tests...
Perhaps someone could pass this along to the correct people working on
autoconf?
Enjoy!
-- Mark
Index: acconfig.h
===================================================================
RCS file: /cvs/openssh_cvs/acconfig.h,v
retrieving revision 1.118
diff -u -p -r1.118 acconfig.h
--- acconfig.h 2001/10/22 00:53:59 1.118
+++ acconfig.h 2001/10/27 01:39:03
@@ -332,6 +332,9 @@
/* Define if you want smartcard support */
#undef SMARTCARD
+/* Define if _FILE_OFFSET_BITS also needs _LARGEFILE64_SOURCE defined */
+#undef _LARGEFILE64_SOURCE
+
@BOTTOM@
/* ******************* Shouldn't need to edit below this line ************** */
Index: configure.ac
===================================================================
RCS file: /cvs/openssh_cvs/configure.ac,v
retrieving revision 1.2
diff -u -p -r1.2 configure.ac
--- configure.ac 2001/10/25 17:01:31 1.2
+++ configure.ac 2001/10/27 01:39:03
@@ -24,6 +24,32 @@ AC_PATH_PROG(TEST_MINUS_S_SH, sh)
# System features
AC_SYS_LARGEFILE
+if test "$ac_cv_sys_file_offset_bits" != no; then
+ AC_MSG_CHECKING(if _LARGEFILE64_SOURCE is needed)
+ AC_TRY_COMPILE(
+ [
+#include "confdefs.h"
+#include <sys/resource.h>
+ ],
+ [ struct rlimit rlim; ],
+ [ AC_MSG_RESULT(no) ],
+ [
+ AC_TRY_COMPILE(
+ [
+#include "confdefs.h"
+#define _LARGEFILE64_SOURCE
+#include <sys/resource.h>
+ ],
+ [ struct rlimit rlim; ],
+ [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(_LARGEFILE64_SOURCE)
+ ],
+ [ AC_MSG_RESULT(problems with struct rlimit found) ]
+ )
+ ]
+ )
+fi
if test -z "$AR" ; then
AC_MSG_ERROR([*** 'ar' missing, please install or fix your \$PATH ***])
More information about the openssh-unix-dev
mailing list