--- /dev/null
+
+The Solaris build will only build the librados library.
+
+Build Prerequisites
+===================
+
+The following Solaris packages are required for compilation:
+
+ git
+ autoconf
+ libtool
+ automake
+ gcc-c++-48
+ gnu-make
+
+ (use the "pkg install <packagename>" command to install, as root)
+
+Download and Compile Boost 1.59 (or higher)
+
+Building Ceph
+=============
+
+ export LDFLAGS="-L<pathtoboost>/boost_1_59_0/stage/lib"
+ export CPPFLAGS="-I<pathtoboost>/boost/boost_1_59_0"
+
+ ./autogen.sh
+ ./configure --disable-server --without-fuse --without-tcmalloc --without-libatomic-ops --without-libaio --without-libxfs
+ cd src
+ gmake librados.la
+
freebsd*)
freebsd="yes"
;;
+solaris*)
+ solaris="yes"
+ ;;
esac
AM_CONDITIONAL(LINUX, test x"$linux" = x"yes")
AM_CONDITIONAL(FREEBSD, test x"$freebsd" = x"yes")
AM_CONDITIONAL(DARWIN, test x"$darwin" = x"yes")
+AM_CONDITIONAL(SOLARIS, test x"$solaris" = x"yes")
# Checks for programs.
AC_PROG_CXX
sys/time.h \
sys/vfs.h \
sys/xattr.h \
+ sys/cdefs.h \
syslog.h \
utime.h \
])
if !CLANG
AM_COMMON_CFLAGS += -rdynamic
endif
+if SOLARIS
+ AM_COMMON_CFLAGS += -Wno-unused-local-typedefs
+endif
AM_CFLAGS = $(AM_COMMON_CFLAGS) $(HARDENING_CFLAGS)
AM_CPPFLAGS = $(AM_COMMON_CPPFLAGS)
AM_CXXFLAGS += -Wstrict-null-sentinel
endif
+# solaris harding
+if SOLARIS
+ AM_CXXFLAGS += -lssp_nonshared
+endif
+
# note: this is position dependant, it affects the -l options that
# come after it on the command line. when you use ${AM_LDFLAGS} in
# later rules, take care where you place it. for more information, see
/* $KAME: sctp_crc32.c,v 1.12 2005/03/06 16:04:17 itojun Exp $ */
-
+#ifdef HAVE_SYS_TYPES_H
#include <sys/cdefs.h>
+#endif
#if 0
__FBSDID("$FreeBSD: src/sys/netinet/sctp_crc32.c,v 1.8 2007/05/08 17:01:10 rrs Exp $");
ret = sigaction(signum, &act, &oldact);
if (ret != 0) {
char buf[1024];
+#if defined(__sun)
+ char message[SIG2STR_MAX];
+ sig2str(signum,message);
+ snprintf(buf, sizeof(buf), "install_sighandler: sigaction returned "
+ "%d when trying to install a signal handler for %s\n",
+ ret, message);
+#else
snprintf(buf, sizeof(buf), "install_sighandler: sigaction returned "
"%d when trying to install a signal handler for %s\n",
ret, sys_siglist[signum]);
+#endif
dout_emergency(buf);
exit(1);
}
// case, SA_RESETHAND specifies that the default signal handler--
// presumably dump core-- will handle it.
char buf[1024];
+#if defined(__sun)
+ char message[SIG2STR_MAX];
+ sig2str(signum,message);
+ snprintf(buf, sizeof(buf), "*** Caught signal (%s) **\n "
+ "in thread %llx\n", message, (unsigned long long)pthread_self());
+#else
snprintf(buf, sizeof(buf), "*** Caught signal (%s) **\n "
"in thread %llx\n", sys_siglist[signum], (unsigned long long)pthread_self());
+#endif
dout_emergency(buf);
pidfile_remove();
#elif defined(__FreeBSD__)
#include <sys/cdefs.h>
#define __GNUC_PREREQ(minor, major) __GNUC_PREREQ__(minor, major)
+#elif defined(__sun)
+#include "include/compat.h"
+#include <assert.h>
#endif
#ifdef __CEPH__
#define lseek64(fd, offset, whence) lseek(fd, offset, whence)
#endif
+#if defined(__sun)
+#define LOG_AUTHPRIV (10<<3)
+#define LOG_FTP (11<<3)
+#define __STRING(x) "x"
+#define IFTODT(mode) (((mode) & 0170000) >> 12)
+#endif
+
#endif /* !CEPH_COMPAT_H */
inline void decode(type &v, bufferlist::iterator& p) { __ASSERT_FUNCTION decode_raw(v, p); }
WRITE_RAW_ENCODER(__u8)
+#ifndef _CHAR_IS_SIGNED
WRITE_RAW_ENCODER(__s8)
+#endif
WRITE_RAW_ENCODER(char)
WRITE_RAW_ENCODER(ceph_le64)
WRITE_RAW_ENCODER(ceph_le32)
typedef off_t off64_t;
#endif
+#ifdef __sun
+typedef off_t loff_t;
+#endif
+
+
// -- io helpers --
template<class A, class B>
#include <vector>
#include <map>
-#if defined(DARWIN) || defined(__FreeBSD__)
+#if defined(DARWIN) || defined(__FreeBSD__) || defined(__sun)
#include <sys/statvfs.h>
#else
#include <sys/vfs.h> /* or <sys/statfs.h> */
$(top_builddir)/src/gmock/gtest/lib/libgtest.la \
$(PTHREAD_LIBS)
+if SOLARIS
+UNITTEST_LDADD += \
+ -lsocket -lnsl
+endif
+
unittest_addrs_SOURCES = test/test_addrs.cc
unittest_addrs_CXXFLAGS = $(UNITTEST_CXXFLAGS)
unittest_addrs_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)