summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-backup/cpdup/files/cpdup-1.18-portable.patch')
-rw-r--r--app-backup/cpdup/files/cpdup-1.18-portable.patch128
1 files changed, 128 insertions, 0 deletions
diff --git a/app-backup/cpdup/files/cpdup-1.18-portable.patch b/app-backup/cpdup/files/cpdup-1.18-portable.patch
new file mode 100644
index 000000000000..90a82d98a6dc
--- /dev/null
+++ b/app-backup/cpdup/files/cpdup-1.18-portable.patch
@@ -0,0 +1,128 @@
+--- a/compat_sun.h
++++ b/compat_sun.h
+@@ -1,6 +1,3 @@
+-/* __unused is a gcc'ism. */
+-#define __unused
+-
+ #include <stdio.h>
+ #include <stdarg.h>
+
+--- a/cpdup.c
++++ b/cpdup.c
+@@ -127,8 +127,8 @@
+ static void hltdelete(struct hlink *);
+ static void hltsetdino(struct hlink *, ino_t);
+ static int YesNo(const char *path);
+-static int xrename(const char *src, const char *dst, u_long flags);
+-static int xlink(const char *src, const char *dst, u_long flags);
++static int xrename(const char *src, const char *dst, unsigned long flags);
++static int xlink(const char *src, const char *dst, unsigned long flags);
+ static int xremove(struct HostConf *host, const char *path);
+ static int DoCopy(copy_info_t info, struct stat *stat1, int depth);
+ static int ScanDir(List *list, struct HostConf *host, const char *path,
+@@ -1648,7 +1648,7 @@
+ */
+
+ static int
+-xrename(const char *src, const char *dst, u_long flags)
++xrename(const char *src, const char *dst, unsigned long flags)
+ {
+ int r;
+
+@@ -1663,7 +1663,7 @@
+ }
+
+ static int
+-xlink(const char *src, const char *dst, u_long flags)
++xlink(const char *src, const char *dst, unsigned long flags)
+ {
+ int r;
+ #ifdef _ST_FLAGS_PRESENT_
+--- a/cpdup.h
++++ b/cpdup.h
+@@ -39,7 +39,6 @@
+ #define __printflike(a,b)
+ #define __printf0like(a,b)
+ #define __aligned(x)
+-#define __unused
+ #endif
+
+ void logstd(const char *ctl, ...) __printflike(1, 2);
+--- a/hclink.c
++++ b/hclink.c
+@@ -73,7 +73,7 @@
+ }
+
+ static int
+-rc_badop(hctransaction_t trans __unused, struct HCHead *head)
++rc_badop(hctransaction_t trans, struct HCHead *head)
+ {
+ head->error = EOPNOTSUPP;
+ return(0);
+--- a/hcproto.c
++++ b/hcproto.c
+@@ -10,6 +10,8 @@
+ #include "hclink.h"
+ #include "hcproto.h"
+
++#include <bsd/string.h>
++
+ static int hc_decode_stat(hctransaction_t trans, struct stat *, struct HCHead *);
+ static int hc_decode_stat_item(struct stat *st, struct HCLeaf *item);
+ static int rc_encode_stat(hctransaction_t trans, struct stat *);
+@@ -1503,7 +1505,7 @@
+ * CHFLAGS
+ */
+ int
+-hc_chflags(struct HostConf *hc, const char *path, u_long flags)
++hc_chflags(struct HostConf *hc, const char *path, unsigned long flags)
+ {
+ hctransaction_t trans;
+ struct HCHead *head;
+@@ -1535,7 +1537,7 @@
+ {
+ struct HCLeaf *item;
+ const char *path = NULL;
+- u_long flags = 0;
++ unsigned long flags = 0;
+ int rc;
+
+ FOR_EACH_ITEM(item, trans, head) {
+@@ -1544,7 +1546,7 @@
+ path = HCC_STRING(item);
+ break;
+ case LC_FILEFLAGS:
+- flags = (u_long)HCC_INT64(item);
++ flags = (unsigned long)HCC_INT64(item);
+ break;
+ }
+ }
+@@ -1846,7 +1848,7 @@
+ }
+
+ static int
+-rc_geteuid(hctransaction_t trans, struct HCHead *head __unused)
++rc_geteuid(hctransaction_t trans, struct HCHead *head)
+ {
+ hcc_leaf_int32(trans, LC_UID, geteuid());
+ return (0);
+@@ -1920,7 +1922,7 @@
+ }
+
+ static int
+-rc_getgroups(hctransaction_t trans, struct HCHead *head __unused)
++rc_getgroups(hctransaction_t trans, struct HCHead *head)
+ {
+ int count, i;
+ gid_t *gidlist;
+--- a/hcproto.h
++++ b/hcproto.h
+@@ -105,7 +105,7 @@
+ int hc_chmod(struct HostConf *hc, const char *path, mode_t mode);
+ int hc_mknod(struct HostConf *hc, const char *path, mode_t mode, dev_t rdev);
+ int hc_link(struct HostConf *hc, const char *name1, const char *name2);
+-int hc_chflags(struct HostConf *hc, const char *path, u_long flags);
++int hc_chflags(struct HostConf *hc, const char *path, unsigned long flags);
+ int hc_readlink(struct HostConf *hc, const char *path, char *buf, int bufsiz);
+ mode_t hc_umask(struct HostConf *hc, mode_t numask);
+ int hc_symlink(struct HostConf *hc, const char *name1, const char *name2);