forked from lix-project/lix
Merge pull request #704 from ysangkok/freebsd-support
FreeBSD support with knowledge about Linux emulation
This commit is contained in:
commit
cad40adce5
|
@ -4,10 +4,12 @@ CFLAGS = @CFLAGS@
|
||||||
CXX = @CXX@
|
CXX = @CXX@
|
||||||
CXXFLAGS = @CXXFLAGS@
|
CXXFLAGS = @CXXFLAGS@
|
||||||
HAVE_SODIUM = @HAVE_SODIUM@
|
HAVE_SODIUM = @HAVE_SODIUM@
|
||||||
|
LIBCURL_LIBS = @LIBCURL_LIBS@
|
||||||
OPENSSL_LIBS = @OPENSSL_LIBS@
|
OPENSSL_LIBS = @OPENSSL_LIBS@
|
||||||
PACKAGE_NAME = @PACKAGE_NAME@
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
SODIUM_LIBS = @SODIUM_LIBS@
|
SODIUM_LIBS = @SODIUM_LIBS@
|
||||||
|
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||||
bash = @bash@
|
bash = @bash@
|
||||||
bindir = @bindir@
|
bindir = @bindir@
|
||||||
bsddiff_compat_include = @bsddiff_compat_include@
|
bsddiff_compat_include = @bsddiff_compat_include@
|
||||||
|
|
|
@ -61,9 +61,11 @@ ifeq ($(BUILD_SHARED_LIBS), 1)
|
||||||
endif
|
endif
|
||||||
ifneq ($(OS), Darwin)
|
ifneq ($(OS), Darwin)
|
||||||
ifneq ($(OS), SunOS)
|
ifneq ($(OS), SunOS)
|
||||||
|
ifneq ($(OS), FreeBSD)
|
||||||
GLOBAL_LDFLAGS += -Wl,--no-copy-dt-needed-entries
|
GLOBAL_LDFLAGS += -Wl,--no-copy-dt-needed-entries
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
SET_RPATH_TO_LIBS ?= 1
|
SET_RPATH_TO_LIBS ?= 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,10 @@ libexpr_CXXFLAGS := -Wno-deprecated-register
|
||||||
|
|
||||||
libexpr_LIBS = libutil libstore libformat
|
libexpr_LIBS = libutil libstore libformat
|
||||||
|
|
||||||
libexpr_LDFLAGS = -ldl
|
libexpr_LDFLAGS =
|
||||||
|
ifneq ($(OS), FreeBSD)
|
||||||
|
libexpr_LDFLAGS += -ldl
|
||||||
|
endif
|
||||||
|
|
||||||
# The dependency on libgc must be propagated (i.e. meaning that
|
# The dependency on libgc must be propagated (i.e. meaning that
|
||||||
# programs/libraries that use libexpr must explicitly pass -lgc),
|
# programs/libraries that use libexpr must explicitly pass -lgc),
|
||||||
|
|
|
@ -1276,6 +1276,8 @@ static bool canBuildLocally(const BasicDerivation & drv)
|
||||||
|| (drv.platform == "i686-linux" && settings.thisSystem == "x86_64-linux")
|
|| (drv.platform == "i686-linux" && settings.thisSystem == "x86_64-linux")
|
||||||
|| (drv.platform == "armv6l-linux" && settings.thisSystem == "armv7l-linux")
|
|| (drv.platform == "armv6l-linux" && settings.thisSystem == "armv7l-linux")
|
||||||
#endif
|
#endif
|
||||||
|
|| (platform == "i686-linux" && settings.thisSystem == "x86_64-freebsd")
|
||||||
|
|| (platform == "i686-linux" && settings.thisSystem == "i686-freebsd")
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ libstore_SOURCES := $(wildcard $(d)/*.cc)
|
||||||
|
|
||||||
libstore_LIBS = libutil libformat
|
libstore_LIBS = libutil libformat
|
||||||
|
|
||||||
libstore_LDFLAGS = -lsqlite3 -lbz2 -lcurl
|
libstore_LDFLAGS = $(SQLITE3_LIBS) -lbz2 $(LIBCURL_LIBS)
|
||||||
|
|
||||||
ifeq ($(OS), SunOS)
|
ifeq ($(OS), SunOS)
|
||||||
libstore_LDFLAGS += -lsocket
|
libstore_LDFLAGS += -lsocket
|
||||||
|
|
|
@ -692,6 +692,10 @@ static PeerInfo getPeerInfo(int remote)
|
||||||
|
|
||||||
#elif defined(LOCAL_PEERCRED)
|
#elif defined(LOCAL_PEERCRED)
|
||||||
|
|
||||||
|
#if !defined(SOL_LOCAL)
|
||||||
|
#define SOL_LOCAL 0
|
||||||
|
#endif
|
||||||
|
|
||||||
xucred cred;
|
xucred cred;
|
||||||
socklen_t credLen = sizeof(cred);
|
socklen_t credLen = sizeof(cred);
|
||||||
if (getsockopt(remote, SOL_LOCAL, LOCAL_PEERCRED, &cred, &credLen) == -1)
|
if (getsockopt(remote, SOL_LOCAL, LOCAL_PEERCRED, &cred, &credLen) == -1)
|
||||||
|
|
Loading…
Reference in a new issue