]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Better fix of missing AF_INET6? definition in lib/socket.h
authorJan Moskyto Matejka <mq@ucw.cz>
Tue, 22 Dec 2015 08:45:09 +0000 (09:45 +0100)
committerJan Moskyto Matejka <mq@ucw.cz>
Tue, 22 Dec 2015 08:45:09 +0000 (09:45 +0100)
Moved the code to sysdep.

lib/socket.h
sysdep/unix/io.c

index de8cff62f433e3a2f2f5918e704444056c2c8928..d7c78e72be9f13008882513e9364b553020b88c9 100644 (file)
@@ -10,7 +10,6 @@
 #define _BIRD_SOCKET_H_
 
 #include <errno.h>
-#include <sys/socket.h>
 
 #include "lib/resource.h"
 
@@ -67,11 +66,8 @@ void sk_set_tbsize(sock *s, uint val);       /* Resize TX buffer, keeping content */
 void sk_set_tbuf(sock *s, void *tbuf); /* Switch TX buffer, NULL-> return to internal */
 void sk_dump_all(void);
 
-static inline int sk_is_ipv4(sock *s)
-{ return s->af == AF_INET; }
-
-static inline int sk_is_ipv6(sock *s)
-{ return s->af == AF_INET6; }
+int sk_is_ipv4(sock *s);               /* True if socket is IPv4 */
+int sk_is_ipv6(sock *s);               /* True if socket is IPv6 */
 
 static inline int sk_send_buffer_empty(sock *sk)
 { return sk->tbuf == sk->tpos; }
index bc00def9a80737fa6a13b78d13f588e9334bed48..43c2eeef0750219d672cb0f1ca915f7e8102a4c4 100644 (file)
@@ -1860,6 +1860,12 @@ sk_write(sock *s)
   }
 }
 
+int sk_is_ipv4(sock *s)
+{ return s->af == AF_INET; }
+
+int sk_is_ipv6(sock *s)
+{ return s->af == AF_INET6; }
+
 void
 sk_dump_all(void)
 {