Przeglądaj źródła

fdm: fix musl compile

musl does not define some macros so define them ourselves

Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de>
Dirk Neukirchen 9 lat temu
rodzic
commit
65f803ee20

+ 13
- 0
mail/fdm/patches/010-musl_WAIT_ANY.patch Wyświetl plik

@@ -0,0 +1,13 @@
1
+--- a/fdm.c
2
++++ b/fdm.c
3
+@@ -22,6 +22,10 @@
4
+ #include <sys/utsname.h>
5
+ #include <sys/wait.h>
6
+ 
7
++#ifndef WAIT_ANY
8
++#define WAIT_ANY (-1)
9
++#endif
10
++
11
+ #include <errno.h>
12
+ #include <fcntl.h>
13
+ #include <fnmatch.h>

+ 22
- 0
mail/fdm/patches/020-musl_GLOB_BRACE.patch Wyświetl plik

@@ -0,0 +1,22 @@
1
+--- a/fetch-maildir.c
2
++++ b/fetch-maildir.c
3
+@@ -31,6 +31,8 @@
4
+ #include "fdm.h"
5
+ #include "fetch.h"
6
+ 
7
++#define GLOB_BRACE 0
8
++
9
+ int	fetch_maildir_commit(struct account *, struct mail *);
10
+ void	fetch_maildir_abort(struct account *);
11
+ u_int	fetch_maildir_total(struct account *);
12
+--- a/fetch-mbox.c
13
++++ b/fetch-mbox.c
14
+@@ -32,6 +32,8 @@
15
+ #include "fdm.h"
16
+ #include "fetch.h"
17
+ 
18
++#define GLOB_BRACE 0
19
++
20
+ int	fetch_mbox_commit(struct account *, struct mail *);
21
+ void	fetch_mbox_abort(struct account *);
22
+ u_int	fetch_mbox_total(struct account *);

+ 11
- 0
mail/fdm/patches/030-musl_ACCESSPERMS.patch Wyświetl plik

@@ -0,0 +1,11 @@
1
+--- a/file.c
2
++++ b/file.c
3
+@@ -26,6 +26,8 @@
4
+ 
5
+ #include "fdm.h"
6
+ 
7
++#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)
8
++
9
+ int	mklock(u_int, const char *);
10
+ void	rmlock(u_int, const char *);
11
+ int	lockfd(u_int, int);