From b3fb853a718f4384ec7212943d9383e68bca75b4 Mon Sep 17 00:00:00 2001 From: deraadt Date: Mon, 29 Nov 2021 06:39:23 +0000 Subject: [PATCH] local copy of roundup() means no more sys/param.h --- usr.bin/netstat/if.c | 5 +++-- usr.bin/systat/if.c | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c index 1f8d0dec39e..d2b329ac54e 100644 --- a/usr.bin/netstat/if.c +++ b/usr.bin/netstat/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.77 2021/01/16 17:42:52 claudio Exp $ */ +/* $OpenBSD: if.c,v 1.78 2021/11/29 06:39:23 deraadt Exp $ */ /* $NetBSD: if.c,v 1.16.4.2 1996/06/07 21:46:46 thorpej Exp $ */ /* @@ -30,7 +30,6 @@ * SUCH DAMAGE. */ -#include /* roundup() */ #include #include #include @@ -55,6 +54,8 @@ #include #include +#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) + #include "netstat.h" static void print_addr(struct sockaddr *, struct sockaddr **, struct if_data *); diff --git a/usr.bin/systat/if.c b/usr.bin/systat/if.c index 649ad255756..66733cff0dc 100644 --- a/usr.bin/systat/if.c +++ b/usr.bin/systat/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.26 2021/01/18 00:49:09 mortimer Exp $ */ +/* $OpenBSD: if.c,v 1.27 2021/11/29 06:39:23 deraadt Exp $ */ /* * Copyright (c) 2004 Markus Friedl * @@ -15,7 +15,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include /* roundup */ +#include #include #include #include @@ -29,6 +29,8 @@ #include #include +#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) + #include "systat.h" static enum state { BOOT, TIME, RUN } state = TIME; -- 2.20.1