Files
haikuports/app-arch/xar/patches/xar-1.5.2.patchset
2013-11-24 20:53:02 -07:00

89 lines
2.7 KiB
Plaintext

From f1df8eee79076b29537b7d8a4b909c2c87299225 Mon Sep 17 00:00:00 2001
From: Chris Roberts <cpr420@gmail.com>
Date: Sun, 24 Nov 2013 20:15:58 -0700
Subject: applying patch xar-1.5.2.patch
diff --git a/lib/darwinattr.c b/lib/darwinattr.c
index d3bf136..94206d7 100644
--- a/lib/darwinattr.c
+++ b/lib/darwinattr.c
@@ -40,7 +40,7 @@
#include <unistd.h>
#include <string.h>
#include <libgen.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
#include <sys/stat.h>
#include <arpa/inet.h>
#include "xar.h"
diff --git a/lib/stat.c b/lib/stat.c
index dddb1d4..41634bc 100644
--- a/lib/stat.c
+++ b/lib/stat.c
@@ -53,7 +53,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
#include <time.h>
#include <pwd.h>
#include <grp.h>
--
1.8.3.4
From adddad2e4b7bd548ba8a84a4bd44ed8fe298deef Mon Sep 17 00:00:00 2001
From: Chris Roberts <cpr420@gmail.com>
Date: Sun, 24 Nov 2013 20:46:25 -0700
Subject: Search for xattr support on Haiku
diff --git a/configure.ac b/configure.ac
index 5c905fa..f3e0d5a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -184,6 +184,7 @@ AC_SUBST([enable_autogen])
AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/acl.h>], [acl_t a], [AC_DEFINE([HAVE_SYS_ACL_H],[1], [define if you have sys/acl.h and it has a working acl_t type])])
AC_CHECK_HEADERS(ext2fs/ext2_fs.h sys/statfs.h sys/xattr.h sys/param.h sys/extattr.h libutil.h)
+AC_SEARCH_LIBS(getxattr, gnu)
AC_CHECK_FUNCS(lgetxattr)
AC_CHECK_FUNCS(lsetxattr)
AC_CHECK_FUNCS(getxattr)
@@ -197,6 +198,8 @@ AC_CHECK_FUNCS(statvfs)
AC_CHECK_FUNCS(statfs)
AC_CHECK_FUNCS(strmode)
+AC_SEARCH_LIBS(strsep, bsd)
+
AC_CHECK_MEMBERS([struct statfs.f_fstypename],,,[#include <sys/types.h>
#include <sys/param.h>
#include <sys/mount.h>])
diff --git a/lib/linuxattr.c b/lib/linuxattr.c
index 29d8147..fd4f8e7 100644
--- a/lib/linuxattr.c
+++ b/lib/linuxattr.c
@@ -135,7 +135,7 @@ int32_t xar_linuxattr_write(xar_t x, xar_file_t f, void *buf, size_t len, void *
int32_t xar_linuxattr_archive(xar_t x, xar_file_t f, const char* file, const char *buffer, size_t len)
{
-#if defined(HAVE_SYS_XATTR_H) && defined(HAVE_LGETXATTR) && !defined(__APPLE__)
+#if defined(HAVE_SYS_XATTR_H) && defined(HAVE_LGETXATTR) && !defined(__APPLE__) && !defined(__HAIKU__)
char *i, *buf = NULL;
int ret, retval=0, bufsz = 1024;
struct statfs sfs;
@@ -200,7 +200,7 @@ BAIL:
int32_t xar_linuxattr_extract(xar_t x, xar_file_t f, const char* file, char *buffer, size_t len)
{
-#if defined HAVE_SYS_XATTR_H && defined(HAVE_LSETXATTR) && !defined(__APPLE__)
+#if defined HAVE_SYS_XATTR_H && defined(HAVE_LSETXATTR) && !defined(__APPLE__) && !defined(__HAIKU__)
const char *fsname = "bogus";
struct statfs sfs;
int eaopt = 0;
--
1.8.3.4