summaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorIsmael Luceno2021-01-23 02:57:55 +0100
committerIsmael Luceno2021-01-23 02:57:55 +0100
commitd857efbf59c9c87eab58af76e3dbca8fcf91c142 (patch)
treec9d7852dba4f252e30577a8cc3cbbc2f78b3feed /mail
parent67d9764123891e89c4e2a302dda1738dac6329e4 (diff)
fdm: Fix build against musl libc
Diffstat (limited to 'mail')
-rw-r--r--mail/fdm/HISTORY2
-rwxr-xr-xmail/fdm/PRE_BUILD7
-rw-r--r--mail/fdm/patches/0001-Fix-base64-function-prototypes.patch17
3 files changed, 26 insertions, 0 deletions
diff --git a/mail/fdm/HISTORY b/mail/fdm/HISTORY
index 5a9640becc..2545d9f0e1 100644
--- a/mail/fdm/HISTORY
+++ b/mail/fdm/HISTORY
@@ -1,6 +1,8 @@
2021-01-23 Ismael Luceno <ismael@sourcemage.org>
* DETAILS: Fixed SOURCE_URL[0]
updated spell to 2.0
+ * PRE_BUILD, patches/0001-Fix-base64-function-prototypes.patch:
+ fixed build against musl
2014-09-09 Remko van der Vossen <wich@sourcemage.org>
* DEPENDS: pcre, SSL
diff --git a/mail/fdm/PRE_BUILD b/mail/fdm/PRE_BUILD
new file mode 100755
index 0000000000..55be45d311
--- /dev/null
+++ b/mail/fdm/PRE_BUILD
@@ -0,0 +1,7 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+apply_patch_dir patches &&
+# remove cdefs.h; not needed nor available
+sedit '\!^#include <sys/cdefs\.h>!d' fdm.h &&
+# fix duplicated entry
+sedit '/^\t\$(am__obj/s/ \$(am__objects_1)$//' Makefile.in
diff --git a/mail/fdm/patches/0001-Fix-base64-function-prototypes.patch b/mail/fdm/patches/0001-Fix-base64-function-prototypes.patch
new file mode 100644
index 0000000000..3c89a51ea4
--- /dev/null
+++ b/mail/fdm/patches/0001-Fix-base64-function-prototypes.patch
@@ -0,0 +1,17 @@
+Fix base64 function prototypes. These are used when not provided by the libc.
+
+diff --git a/fdm.h b/fdm.h
+index 481b7930e04f..dafc7818a711 100644
+--- a/fdm.h
++++ b/fdm.h
+@@ -724,8 +724,8 @@ size_t strlcat(char *, const char *, size_t);
+
+ #ifndef HAVE_B64_NTOP
+ /* base64.c */
+-int b64_ntop(src, srclength, target, targsize);
+-int b64_pton(src, target, targsize);
++int b64_ntop(const u_char *, size_t, char *, size_t);
++int b64_pton(const char *, u_char *, size_t);
+ #endif
+
+ /* shm.c */