]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Rename sk_new() to avoid name collision with OpenSSL.
authorOndrej Zajicek <santiago@crfreenet.org>
Wed, 18 Jul 2012 17:35:30 +0000 (19:35 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Wed, 18 Jul 2012 17:35:30 +0000 (19:35 +0200)
lib/socket.h
sysdep/unix/io.c

index b0c3eda2c20f0b37ae091fc602478a8184f5f2b3..0ee43b526456d3ff1d7a48d02bda2f5704233fc5 100644 (file)
@@ -48,7 +48,9 @@ typedef struct birdsock {
   char *password;                              /* Password for MD5 authentication */
 } sock;
 
-sock *sk_new(pool *);                  /* Allocate new socket */
+sock *sock_new(pool *);                        /* Allocate new socket */
+#define sk_new(X) sock_new(X)          /* Wrapper to avoid name collision with OpenSSL */
+
 int sk_open(sock *);                   /* Open socket */
 int sk_send(sock *, unsigned len);     /* Send data, <0=err, >0=ok, 0=sleep */
 int sk_send_to(sock *, unsigned len, ip_addr to, unsigned port); /* sk_send to given destination */
index 475d660cdeb9ca87269fb79f2f25da975a6dc9d6..f91b527859816c33365845ff459992ac6f362b67 100644 (file)
@@ -588,9 +588,12 @@ static struct resclass sk_class = {
  * This function creates a new socket resource. If you want to use it,
  * you need to fill in all the required fields of the structure and
  * call sk_open() to do the actual opening of the socket.
+ *
+ * The real function name is sock_new(), sk_new() is a macro wrapper
+ * to avoid collision with OpenSSL.
  */
 sock *
-sk_new(pool *p)
+sock_new(pool *p)
 {
   sock *s = ralloc(p, &sk_class);
   s->pool = p;