aboutsummaryrefslogtreecommitdiffstats
path: root/main/fsarchiver/musl.patch
blob: cc4b2ea1d3eb1cfe925cc0bb1fe6b36570aeede1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
diff -rupN a/src/common.c b/src/common.c
--- a/src/common.c	2014-02-13 22:31:32.000000000 +0100
+++ b/src/common.c	2014-02-24 16:56:50.054679687 +0100
@@ -29,7 +29,6 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <stdlib.h>
-#include <execinfo.h>
 #include <wordexp.h>
 #include <fnmatch.h>
 #include <time.h>
@@ -549,23 +548,6 @@ u64 stats_errcount(cstats stats)
 
 int format_stacktrace(char *buffer, int bufsize)
 {
-    const int stack_depth=20;
-    void *temp[stack_depth];
-    char **strings;
-    int nptrs;
-    int i;
-    
-    // format the backtrace (advanced error info)
-    memset(buffer, 0, bufsize);
-    nptrs=backtrace(temp, stack_depth);
-    strings=backtrace_symbols(temp, nptrs);
-    if (strings!=NULL)
-    {
-        for (i = 0; i < nptrs; i++)
-            strlcatf(buffer, bufsize, "%s\n", strings[i]);
-        free(strings);
-    }
-    
     return 0;
 }
 
diff -rupN a/src/fsarchiver.h b/src/fsarchiver.h
--- a/src/fsarchiver.h	2014-02-13 22:43:59.000000000 +0100
+++ b/src/fsarchiver.h	2014-02-24 16:57:13.494680985 +0100
@@ -19,6 +19,7 @@
 #define __FSARCHIVER_H__
 
 #include "types.h"
+#include <linux/limits.h> 
 
 // ----------------------------- min and max -----------------------------
 #if !defined(min)
diff -rupN a/src/fs_xfs.h b/src/fs_xfs.h
--- a/src/fs_xfs.h	2014-02-13 22:30:56.000000000 +0100
+++ b/src/fs_xfs.h	2014-02-24 16:49:23.984654967 +0100
@@ -39,34 +39,34 @@ typedef int32_t __s32;
 typedef uint64_t __u64;
 typedef int64_t __s64;
 
-typedef __uint32_t      xfs_agblock_t;  /* blockno in alloc. group */
-typedef __uint32_t      xfs_extlen_t;   /* extent length in blocks */
-typedef __uint32_t      xfs_agnumber_t; /* allocation group number */
-typedef __int32_t       xfs_extnum_t;   /* # of extents in a file */
-typedef __int16_t       xfs_aextnum_t;  /* # extents in an attribute fork */
-typedef __int64_t       xfs_fsize_t;    /* bytes in a file */
-typedef __uint64_t      xfs_ufsize_t;   /* unsigned bytes in a file */
+typedef uint32_t      xfs_agblock_t;  /* blockno in alloc. group */
+typedef uint32_t      xfs_extlen_t;   /* extent length in blocks */
+typedef uint32_t      xfs_agnumber_t; /* allocation group number */
+typedef int32_t       xfs_extnum_t;   /* # of extents in a file */
+typedef int16_t       xfs_aextnum_t;  /* # extents in an attribute fork */
+typedef int64_t       xfs_fsize_t;    /* bytes in a file */
+typedef uint64_t      xfs_ufsize_t;   /* unsigned bytes in a file */
 
-typedef __int32_t       xfs_suminfo_t;  /* type of bitmap summary info */
-typedef __int32_t       xfs_rtword_t;   /* word type for bitmap manipulations */
+typedef int32_t       xfs_suminfo_t;  /* type of bitmap summary info */
+typedef int32_t       xfs_rtword_t;   /* word type for bitmap manipulations */
  
-typedef __int64_t       xfs_lsn_t;      /* log sequence number */
-typedef __int32_t       xfs_tid_t;      /* transaction identifier */
+typedef int64_t       xfs_lsn_t;      /* log sequence number */
+typedef int32_t       xfs_tid_t;      /* transaction identifier */
 
-typedef __uint32_t      xfs_dablk_t;    /* dir/attr block number (in file) */
-typedef __uint32_t      xfs_dahash_t;   /* dir/attr hash value */
+typedef uint32_t      xfs_dablk_t;    /* dir/attr block number (in file) */
+typedef uint32_t      xfs_dahash_t;   /* dir/attr hash value */
 
-typedef __uint16_t      xfs_prid_t;     /* prid_t truncated to 16bits in XFS */
+typedef uint16_t      xfs_prid_t;     /* prid_t truncated to 16bits in XFS */
 
 /*
  * These types are 64 bits on disk but are either 32 or 64 bits in memory.
  * Disk based types:
  */
-typedef __uint64_t      xfs_dfsbno_t;   /* blockno in filesystem (agno|agbno) */
-typedef __uint64_t      xfs_drfsbno_t;  /* blockno in filesystem (raw) */
-typedef __uint64_t      xfs_drtbno_t;   /* extent (block) in realtime area */
-typedef __uint64_t      xfs_dfiloff_t;  /* block number in a file */
-typedef __uint64_t      xfs_dfilblks_t; /* number of blocks in a file */
+typedef uint64_t      xfs_dfsbno_t;   /* blockno in filesystem (agno|agbno) */
+typedef uint64_t      xfs_drfsbno_t;  /* blockno in filesystem (raw) */
+typedef uint64_t      xfs_drtbno_t;   /* extent (block) in realtime area */
+typedef uint64_t      xfs_dfiloff_t;  /* block number in a file */
+typedef uint64_t      xfs_dfilblks_t; /* number of blocks in a file */
 
 typedef __s64           xfs_off_t;      /* <file offset> type */
 typedef __u64           xfs_ino_t;      /* <inode> type */
@@ -84,8 +84,8 @@ typedef struct { unsigned char   __u_bit
  */
 struct xfs_sb 
 {
-        __uint32_t      sb_magicnum;    /* magic number == XFS_SB_MAGIC */
-        __uint32_t      sb_blocksize;   /* logical block size, bytes */
+        uint32_t      sb_magicnum;    /* magic number == XFS_SB_MAGIC */
+        uint32_t      sb_blocksize;   /* logical block size, bytes */
         xfs_drfsbno_t   sb_dblocks;     /* number of data blocks */
         xfs_drfsbno_t   sb_rblocks;     /* number of realtime blocks */
         xfs_drtbno_t    sb_rextents;    /* number of realtime extents */
@@ -99,51 +99,51 @@ struct xfs_sb
         xfs_agnumber_t  sb_agcount;     /* number of allocation groups */
         xfs_extlen_t    sb_rbmblocks;   /* number of rt bitmap blocks */
         xfs_extlen_t    sb_logblocks;   /* number of log blocks */
-        __uint16_t      sb_versionnum;  /* header version == XFS_SB_VERSION */
-        __uint16_t      sb_sectsize;    /* volume sector size, bytes */
-        __uint16_t      sb_inodesize;   /* inode size, bytes */
-        __uint16_t      sb_inopblock;   /* inodes per block */
+        uint16_t      sb_versionnum;  /* header version == XFS_SB_VERSION */
+        uint16_t      sb_sectsize;    /* volume sector size, bytes */
+        uint16_t      sb_inodesize;   /* inode size, bytes */
+        uint16_t      sb_inopblock;   /* inodes per block */
         char            sb_fname[12];   /* file system name */
-        __uint8_t       sb_blocklog;    /* log2 of sb_blocksize */
-        __uint8_t       sb_sectlog;     /* log2 of sb_sectsize */
-        __uint8_t       sb_inodelog;    /* log2 of sb_inodesize */
-        __uint8_t       sb_inopblog;    /* log2 of sb_inopblock */
-        __uint8_t       sb_agblklog;    /* log2 of sb_agblocks (rounded up) */
-        __uint8_t       sb_rextslog;    /* log2 of sb_rextents */
-        __uint8_t       sb_inprogress;  /* mkfs is in progress, don't mount */
-        __uint8_t       sb_imax_pct;    /* max % of fs for inode space */
+        uint8_t       sb_blocklog;    /* log2 of sb_blocksize */
+        uint8_t       sb_sectlog;     /* log2 of sb_sectsize */
+        uint8_t       sb_inodelog;    /* log2 of sb_inodesize */
+        uint8_t       sb_inopblog;    /* log2 of sb_inopblock */
+        uint8_t       sb_agblklog;    /* log2 of sb_agblocks (rounded up) */
+        uint8_t       sb_rextslog;    /* log2 of sb_rextents */
+        uint8_t       sb_inprogress;  /* mkfs is in progress, don't mount */
+        uint8_t       sb_imax_pct;    /* max % of fs for inode space */
         /*
          * These fields must remain contiguous.  If you really
          * want to change their layout, make sure you fix the
          * code in xfs_trans_apply_sb_deltas().
          */
-        __uint64_t      sb_icount;      /* allocated inodes */
-        __uint64_t      sb_ifree;       /* free inodes */
-        __uint64_t      sb_fdblocks;    /* free data blocks */
-        __uint64_t      sb_frextents;   /* free realtime extents */
+        uint64_t      sb_icount;      /* allocated inodes */
+        uint64_t      sb_ifree;       /* free inodes */
+        uint64_t      sb_fdblocks;    /* free data blocks */
+        uint64_t      sb_frextents;   /* free realtime extents */
         /*
          * End contiguous fields.
          */
         xfs_ino_t       sb_uquotino;    /* user quota inode */
         xfs_ino_t       sb_gquotino;    /* group quota inode */
-        __uint16_t      sb_qflags;      /* quota flags */
-        __uint8_t       sb_flags;       /* misc. flags */
-        __uint8_t       sb_shared_vn;   /* shared version number */
+        uint16_t      sb_qflags;      /* quota flags */
+        uint8_t       sb_flags;       /* misc. flags */
+        uint8_t       sb_shared_vn;   /* shared version number */
         xfs_extlen_t    sb_inoalignmt;  /* inode chunk alignment, fsblocks */
-        __uint32_t      sb_unit;        /* stripe or raid unit */
-        __uint32_t      sb_width;       /* stripe or raid width */
-        __uint8_t       sb_dirblklog;   /* log2 of dir block size (fsbs) */
-        __uint8_t       sb_logsectlog;  /* log2 of the log sector size */
-        __uint16_t      sb_logsectsize; /* sector size for the log, bytes */
-        __uint32_t      sb_logsunit;    /* stripe unit size for the log */
-        __uint32_t      sb_features2;   /* additional feature bits */
+        uint32_t      sb_unit;        /* stripe or raid unit */
+        uint32_t      sb_width;       /* stripe or raid width */
+        uint8_t       sb_dirblklog;   /* log2 of dir block size (fsbs) */
+        uint8_t       sb_logsectlog;  /* log2 of the log sector size */
+        uint16_t      sb_logsectsize; /* sector size for the log, bytes */
+        uint32_t      sb_logsunit;    /* stripe unit size for the log */
+        uint32_t      sb_features2;   /* additional feature bits */
         /*
          * bad features2 field as a result of failing to pad the sb
          * structure to 64 bits. Some machines will be using this field
          * for features2 bits. Easiest just to mark it bad and not use
          * it for anything else.
          */
-        __uint32_t      sb_bad_features2;
+        uint32_t      sb_bad_features2;
 
         /* must be padded to 64 bit alignment */
 };
diff -rupN a/src/oper_save.c b/src/oper_save.c
--- a/src/oper_save.c	2014-02-13 22:31:32.000000000 +0100
+++ b/src/oper_save.c	2014-02-24 16:51:07.984660731 +0100
@@ -57,6 +57,10 @@
 #include "error.h"
 #include "queue.h"
 
+#ifndef S_BLKSIZE
+#define S_BLKSIZE 512
+#endif
+
 typedef struct s_savear
 {   carchwriter ai;
     cregmulti   regmulti;