Greetings ports@
I have gone through the code of sic (the irc client), and I have successfully pledged it, can this patch be merged to the OpenBSD ports version of sic?

Raiz


diff --git a/sic.c b/sic.c
index ce6d216..695fd52 100644
--- a/sic.c
+++ b/sic.c
@@ -182,7 +182,14 @@ main(int argc, char *argv[]) {
        setbuf(stdout, NULL);
        setbuf(srv, NULL);
        setbuf(stdin, NULL);
-       for(;;) { /* main loop */
+
+#ifdef __OpenBSD__
+#include <err.h>
+       if (pledge("stdio", NULL) == -1)
+               err(1, "pledge");
+#endif
+
+       for(;;) {
                FD_ZERO(&rd);
                FD_SET(0, &rd);
                FD_SET(fileno(srv), &rd);

Reply via email to