lib: Add array-size header
[petitboot] / lib / pb-config / storage-test.c
index bdb1d0dec2153c46d7c5a49f25dcdef13a7a6ad0..3ce58ef0a03c30b39ea44ac9b0abbfa79a58eea1 100644 (file)
@@ -4,6 +4,8 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 
+#include <array-size/array-size.h>
+
 #include "pb-config.h"
 #include "storage.h"
 
@@ -22,14 +24,15 @@ struct interface_config net2 = {
 };
 
 struct interface_config *interface_configs[] = { &net1, &net2 };
-
-#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
+const char *dns_servers[] = { "192.168.1.1", "192.168.1.2" };
 
 struct config test_config = {
        .autoboot_enabled = true,
        .network = {
                .interfaces = interface_configs,
                .n_interfaces = ARRAY_SIZE(interface_configs),
+               .dns_servers = dns_servers,
+               .n_dns_servers = ARRAY_SIZE(dns_servers),
        }
 };