use pledge by default if compiled on openbsc and provide errno string - ii - irc it, simple FIFO based irc client
 (HTM) git clone git://git.suckless.org/ii
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 584290f2642eeacbe1b24e7174e49139d6787252
 (DIR) parent a4434536cd80325016309edbb02cbd27cd43b42d
 (HTM) Author: Nico Golde <nico@ngolde.de>
       Date:   Tue,  6 Sep 2016 19:58:28 +0200
       
       use pledge by default if compiled on openbsc and provide errno string
       
       Diffstat:
         M config.mk                           |       2 --
         M ii.c                                |       4 ++--
       
       2 files changed, 2 insertions(+), 4 deletions(-)
       ---
 (DIR) diff --git a/config.mk b/config.mk
       @@ -26,5 +26,3 @@ CC          = cc
        CFLAGS      = -g -O0 -W -Wall ${INCLUDES} -DVERSION=\"${VERSION}\"
        LDFLAGS     = ${LIBS}
        
       -# OpenBSD pledge(2) support
       -# CFLAGS+= -DUSE_PLEDGE
 (DIR) diff --git a/ii.c b/ii.c
       @@ -491,9 +491,9 @@ int main(int argc, char *argv[]) {
                }
                irc = tcpopen(port);
                
       -        #ifdef USE_PLEDGE        /* OpenBSD pledge(2) support */
       +        #ifdef __OpenBSD__        /* OpenBSD pledge(2) support */
                        if (pledge("stdio rpath wpath cpath dpath", NULL) == -1) {
       -                        fputs("ii: pledge\n", stderr);
       +                        eprint("ii pledge:");
                                exit(EXIT_FAILURE);
                        }
                #endif