diff options
Diffstat (limited to 'sysdep/linux')
-rw-r--r-- | sysdep/linux/krt-sys.h | 2 | ||||
-rw-r--r-- | sysdep/linux/netlink.c | 4 | ||||
-rw-r--r-- | sysdep/linux/syspriv.h | 9 |
3 files changed, 12 insertions, 3 deletions
diff --git a/sysdep/linux/krt-sys.h b/sysdep/linux/krt-sys.h index 6d6586d1..76ae29b7 100644 --- a/sysdep/linux/krt-sys.h +++ b/sysdep/linux/krt-sys.h @@ -27,7 +27,7 @@ static inline void kif_sys_postconfig(struct kif_config *c UNUSED) { } static inline void kif_sys_init_config(struct kif_config *c UNUSED) { } static inline void kif_sys_copy_config(struct kif_config *d UNUSED, struct kif_config *s UNUSED) { } -static inline struct ifa * kif_get_primary_ip(struct iface *i) { return NULL; } +static inline struct ifa * kif_get_primary_ip(struct iface *i UNUSED) { return NULL; } /* Kernel routes */ diff --git a/sysdep/linux/netlink.c b/sysdep/linux/netlink.c index 7af575a7..ee2cd125 100644 --- a/sysdep/linux/netlink.c +++ b/sysdep/linux/netlink.c @@ -503,7 +503,7 @@ nl_parse_multipath(struct krt_proto *p, struct rtattr *ra) struct rtattr *a[BIRD_RTA_MAX]; struct rtnexthop *nh = RTA_DATA(ra); struct mpnh *rv, *first, **last; - int len = RTA_PAYLOAD(ra); + unsigned len = RTA_PAYLOAD(ra); first = NULL; last = &first; @@ -1584,7 +1584,7 @@ nl_async_msg(struct nlmsghdr *h) } static int -nl_async_hook(sock *sk, int size UNUSED) +nl_async_hook(sock *sk, uint size UNUSED) { struct iovec iov = { nl_async_rx_buffer, NL_RX_SIZE }; struct sockaddr_nl sa; diff --git a/sysdep/linux/syspriv.h b/sysdep/linux/syspriv.h index d2ba95dd..8b210f06 100644 --- a/sysdep/linux/syspriv.h +++ b/sysdep/linux/syspriv.h @@ -1,4 +1,11 @@ +#ifndef _BIRD_SYSPRIV_H_ +#define _BIRD_SYSPRIV_H_ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif + +#include <unistd.h> #include <sys/prctl.h> #include <linux/capability.h> @@ -70,3 +77,5 @@ drop_uid(uid_t uid) if (setresuid(uid, uid, uid) < 0) die("setresuid: %m"); } + +#endif /* _BIRD_SYSPRIV_H_ */ |