From 2a71c1e3b81eee44e0dec88159e814681a1d0bc6 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Wed, 12 Dec 2018 17:58:18 +0100 Subject: [PATCH] treewide: switch to libubox ARRAY_SIZE immplementation Signed-off-by: Hans Dedecker --- src/dhcpv6.c | 3 +++ src/odhcpd.h | 2 -- src/router.c | 3 +++ src/ubus.c | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/dhcpv6.c b/src/dhcpv6.c index e4edf31..59bc422 100644 --- a/src/dhcpv6.c +++ b/src/dhcpv6.c @@ -1,5 +1,6 @@ /** * Copyright (C) 2012-2013 Steven Barth + * Copyright (C) 2018 Hans Dedecker * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License v2 as published by @@ -20,6 +21,8 @@ #include #include +#include + #include "odhcpd.h" #include "dhcpv6.h" diff --git a/src/odhcpd.h b/src/odhcpd.h index ef94cfc..423deaa 100644 --- a/src/odhcpd.h +++ b/src/odhcpd.h @@ -33,8 +33,6 @@ #include #include -#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) - // RFC 6106 defines this router advertisement option #define ND_OPT_ROUTE_INFO 24 #define ND_OPT_RECURSIVE_DNS 25 diff --git a/src/router.c b/src/router.c index 70f9462..c02d675 100644 --- a/src/router.c +++ b/src/router.c @@ -1,5 +1,6 @@ /** * Copyright (C) 2012-2013 Steven Barth + * Copyright (C) 2018 Hans Dedecker * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License v2 as published by @@ -23,6 +24,8 @@ #include #include +#include + #include "router.h" #include "odhcpd.h" diff --git a/src/ubus.c b/src/ubus.c index 1aec590..816ca2a 100644 --- a/src/ubus.c +++ b/src/ubus.c @@ -4,6 +4,8 @@ #include #include +#include + #include "odhcpd.h" #include "dhcpv6.h" #include "dhcpv4.h" -- 2.30.2