diff --git a/mail/altermime/Makefile b/mail/altermime/Makefile index 7ca9ea029f9..314ae1900ca 100755 --- a/mail/altermime/Makefile +++ b/mail/altermime/Makefile @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile,v 1.4 2019/07/14 00:39:38 naddy Exp $ +# $OpenBSD: Makefile,v 1.5 2021/02/10 11:43:58 sthen Exp $ COMMENT= utility for altering mime-encoded mailpacks DISTNAME= altermime-0.3.10 -REVISION= 0 +REVISION= 1 CATEGORIES= mail @@ -13,6 +13,7 @@ HOMEPAGE= https://pldaniels.com/altermime/ # (see share/doc/altermime/LICENCE) PERMIT_PACKAGE= Yes +# uses pledge() WANTLIB += c MASTER_SITES= ${HOMEPAGE} diff --git a/mail/altermime/patches/patch-altermime_c b/mail/altermime/patches/patch-altermime_c new file mode 100644 index 00000000000..c7cb9d85894 --- /dev/null +++ b/mail/altermime/patches/patch-altermime_c @@ -0,0 +1,26 @@ +$OpenBSD: patch-altermime_c,v 1.1 2021/02/10 11:43:58 sthen Exp $ + +Index: altermime.c +--- altermime.c.orig ++++ altermime.c +@@ -11,6 +11,8 @@ Description: Altermime is a program/object which wil + #include + #include + #include ++#include ++#include + + #include "mime_alter.h" + #include "logger.h" +@@ -319,6 +321,11 @@ int main( int argc, char **argv ) + struct ALTERMIMEAPP_globals glb; + + LOGGER_set_output_mode(_LOGGER_STDOUT); ++ ++ if (pledge("stdio rpath wpath cpath", NULL) == -1) { ++ LOGGER_log("Error: pledge: %s\n", strerror(errno)); ++ exit(1); ++ } + + ALTERMIMEAPP_init( &glb ); +