diff options
-rw-r--r-- | usr.bin/netstat/if.c | 5 | ||||
-rw-r--r-- | 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 <sys/param.h> /* roundup() */ #include <sys/types.h> #include <sys/ioctl.h> #include <sys/protosw.h> @@ -55,6 +54,8 @@ #include <unistd.h> #include <util.h> +#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 <markus@openbsd.org> * @@ -15,7 +15,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <sys/param.h> /* roundup */ +#include <sys/types.h> #include <sys/signal.h> #include <sys/socket.h> #include <sys/sysctl.h> @@ -29,6 +29,8 @@ #include <string.h> #include <unistd.h> +#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) + #include "systat.h" static enum state { BOOT, TIME, RUN } state = TIME; |