]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Change from _unused to __unused to match NetBSD cdefs and avoid dhcpcd-5.6 origin/dhcpcd-5.6
authorRoy Marples <roy@marples.name>
Wed, 24 Apr 2013 09:31:31 +0000 (09:31 +0000)
committerRoy Marples <roy@marples.name>
Wed, 24 Apr 2013 09:31:31 +0000 (09:31 +0000)
a compiler failure on linux-headers-3.7

common.h
control.c
dhcp.h
dhcpcd.c
eloop.c
if-bsd.c
ipv6ns.c
ipv6rs.c

index e11cc5110a7c34b34c8cff52d1072e94213cb620..cc431272f39cbff787c22a18af79197f534e69e7 100644 (file)
--- a/common.h
+++ b/common.h
        } while (0 /* CONSTCOND */);
 
 #if __GNUC__ > 2 || defined(__INTEL_COMPILER)
-# define _noreturn __attribute__((__noreturn__))
-# define _packed   __attribute__((__packed__))
-# define _unused   __attribute__((__unused__))
+# ifndef __dead
+#  define __dead __attribute__((__noreturn__))
+# endif
+# ifndef __packed
+#  define __packed   __attribute__((__packed__))
+# endif
+# ifndef __unused
+#  define __unused   __attribute__((__unused__))
+# endif
 #else
-# define _noreturn
-# define _packed
-# define _unused
+# ifndef __dead
+#  define __dead
+# endif
+# ifndef __packed
+#  define __packed
+# endif
+# ifndef __unused
+#  define __unused
+# endif
 #endif
 
 /* We don't really need this as our supported systems define __restrict
index 30e6e5066653a77f9416b7b264f236746f9b5e75..6c98b16a14107c20110057d19166d549a0ecc130 100644 (file)
--- a/control.c
+++ b/control.c
@@ -97,7 +97,7 @@ handle_control_data(void *arg)
 
 /* ARGSUSED */
 static void
-handle_control(_unused void *arg)
+handle_control(__unused void *arg)
 {
        struct sockaddr_un run;
        socklen_t len;
diff --git a/dhcp.h b/dhcp.h
index ea6a86e088ff1c2e330ce5205691ce8b2502d9c3..bbc8367838062fc962d4dc0ad5aeb9d39a4e1c58 100644 (file)
--- a/dhcp.h
+++ b/dhcp.h
@@ -153,7 +153,7 @@ struct dhcp_message {
        uint8_t bootfile[BOOTFILE_LEN];    /* boot file name */
        uint32_t cookie;
        uint8_t options[DHCP_OPTION_LEN]; /* message options - cookie */
-} _packed;
+} __packed;
 
 struct dhcp_lease {
        struct in_addr addr;
index 6aa93b8857c49a3b68f9a3403c2e1b05dbca21f9..2bf574d456d24466d04bc1714a0a0b9e9de36f7c 100644 (file)
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -209,7 +209,7 @@ cleanup(void)
 
 /* ARGSUSED */
 void
-handle_exit_timeout(_unused void *arg)
+handle_exit_timeout(__unused void *arg)
 {
        int timeout;
 
@@ -1270,7 +1270,7 @@ start_interface(void *arg)
 
 /* ARGSUSED */
 static void
-handle_link(_unused void *arg)
+handle_link(__unused void *arg)
 {
        if (manage_link(linkfd) == -1)
                syslog(LOG_ERR, "manage_link: %m");
@@ -1541,7 +1541,7 @@ reconf_reboot(int action, int argc, char **argv, int oi)
 
 /* ARGSUSED */
 static void
-handle_signal(_unused void *arg)
+handle_signal(__unused void *arg)
 {
        struct interface *ifp;
        struct if_options *ifo;
diff --git a/eloop.c b/eloop.c
index 51fe0ac4e5a1a4d6c53fb8fb35be6394bb44b8f3..e2fe2b5feec7973e61a5a511ddfe8b15108cb828 100644 (file)
--- a/eloop.c
+++ b/eloop.c
@@ -285,7 +285,7 @@ eloop_init(void)
 }
 #endif
 
-_noreturn void
+__dead void
 start_eloop(void)
 {
        int msecs, n;
index 1a35ab768e2d78eed0f95491c5eaad9e113c9103..ecfdfc0416483f471be06488c1fb14744d2d2fa8 100644 (file)
--- a/if-bsd.c
+++ b/if-bsd.c
@@ -82,14 +82,14 @@ static char *link_buf;
 static ssize_t link_buflen;
 
 int
-if_init(_unused struct interface *iface)
+if_init(__unused struct interface *iface)
 {
        /* BSD promotes secondary address by default */
        return 0;
 }
 
 int
-if_conf(_unused struct interface *iface)
+if_conf(__unused struct interface *iface)
 {
        /* No extra checks needed on BSD */
        return 0;
index 00bc6dfb67b9e9b68904872f4e662052d52f9d2b..e5ed973d82694e2f66ba1f8dbb59f0c76a1e5f5e 100644 (file)
--- a/ipv6ns.c
+++ b/ipv6ns.c
@@ -257,7 +257,7 @@ ipv6ns_sendprobe(void *arg)
 
 /* ARGSUSED */
 void
-ipv6ns_handledata(_unused void *arg)
+ipv6ns_handledata(__unused void *arg)
 {
        ssize_t len;
        struct cmsghdr *cm;
index e7c9b46abfaca8c28da1740d971b21026192dc1c..0add67af418baf0bf58a2f867e6567c894aed5b7 100644 (file)
--- a/ipv6rs.c
+++ b/ipv6rs.c
@@ -66,7 +66,7 @@ struct nd_opt_rdnss {           /* RDNSS option RFC 6106 */
        uint16_t        nd_opt_rdnss_reserved;
        uint32_t        nd_opt_rdnss_lifetime;
         /* followed by list of IP prefixes */
-} _packed;
+} __packed;
 #endif
 
 #ifndef ND_OPT_DNSSL
@@ -77,7 +77,7 @@ struct nd_opt_dnssl {         /* DNSSL option RFC 6106 */
        uint16_t        nd_opt_dnssl_reserved;
        uint32_t        nd_opt_dnssl_lifetime;
        /* followed by list of DNS servers */
-} _packed;
+} __packed;
 #endif
 
 /* Minimal IPv6 MTU */
@@ -388,7 +388,7 @@ add_router(struct ra *router)
 
 /* ARGSUSED */
 void
-ipv6rs_handledata(_unused void *arg)
+ipv6rs_handledata(__unused void *arg)
 {
        ssize_t len, l, m, n, olen;
        struct cmsghdr *cm;