Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
All supported OS have to support SOCK_SEQPACKET
Baptiste Daroussin committed 10 years ago
commit acc976613364b6c76f35f4b836aa8ab88ba0941b
parent b6b242a
2 files changed +1 -18
modified configure.ac
@@ -243,19 +243,6 @@ AC_SUBST([GIT_HEAD])
AC_DEFINE_UNQUOTED([GIT_HEAD], $GIT_HEAD)
AC_DEFINE([PKG_API], [api_ver])

-
AC_RUN_IFELSE(
-
  [AC_LANG_SOURCE(
-
    [[
-
    #include <sys/types.h>
-
    #include <sys/socket.h>
-
    int main() { return socket(AF_LOCAL, SOCK_SEQPACKET, 0) == -1 ? -1 : 0; }
-
    ]]
-
  )],
-
  [AC_DEFINE([HAVE_SEQPACKET], 1, [Define to 1 if you have SOCK_SEQPACKET working])]
-
)
-

-
AC_SUBST([HAVE_SEQPACKET])
-

AC_SEARCH_LIBS([lzma_version_string], [lzma], [], [
  AC_MSG_ERROR([unable to find the liblzma])
])
modified libpkg/pkg_repo_create.c
@@ -683,12 +683,8 @@ pkg_create_repo(char *path, const char *output_dir, bool filelist,
		if (--remain_jobs == 0) {
			/* Create new worker */
			int ofl;
-
			int st = SOCK_DGRAM;

-
#ifdef HAVE_SEQPACKET
-
			st = SOCK_SEQPACKET;
-
#endif
-
			if (socketpair(AF_UNIX, st, 0, cur_pipe) == -1) {
+
			if (socketpair(AF_UNIX, SOCK_SEQPACKET, 0, cur_pipe) == -1) {
				pkg_emit_errno("pkg_create_repo", "pipe");
				retcode = EPKG_FATAL;
				goto cleanup;