[hackers] [sbase] Revert "Make sbase compile with musl" || sin

From: <git_AT_suckless.org>
Date: Mon, 07 Oct 2013 21:48:20 +0200

commit 8cd24f052582b3f2ad2b85b06dbd2e9ed21ded83
Author: sin <sin_AT_2f30.org>
Date: Mon Oct 7 20:47:33 2013 +0100

    Revert "Make sbase compile with musl"
    
    musl-0.9.14 defines PRIO_MIN and PRIO_MAX

diff --git a/renice.c b/renice.c
index 1d60d41..a1ca2b9 100644
--- a/renice.c
+++ b/renice.c
_AT_@ -100,8 +100,7 @@ renice(int which, int who, long adj)
                 return false;
         }
 
- /* PRIO_{MIN,MAX} does not exist in musl libc */
- adj = MAX(-20, MIN(adj, 20));
+ adj = MAX(PRIO_MIN, MIN(adj, PRIO_MAX));
         if(setpriority(which, who, (int)adj) == -1) {
                 fprintf(stderr, "can't set %d nice level: %s
",
                         who, strerror(errno));
Received on Mon Oct 07 2013 - 21:48:20 CEST

This archive was generated by hypermail 2.3.0 : Mon Oct 07 2013 - 22:00:20 CEST