From 65086fda3d17773918d25d8df0b7bb13c5eade3a Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Wed, 4 Sep 2024 20:34:15 +0200 Subject: [PATCH] Moved sk_open_unix() to common lib --- lib/socket.h | 1 + sysdep/unix/socket.c | 2 +- sysdep/unix/unix.h | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/socket.h b/lib/socket.h index 31009ecb..54d87384 100644 --- a/lib/socket.h +++ b/lib/socket.h @@ -88,6 +88,7 @@ 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 *, struct birdloop *); /* Open socket */ +int sk_open_unix(struct birdsock *s, struct birdloop *, const char *name); /* Open UNIX socket */ void sk_reloop(sock *, struct birdloop *); /* Move socket to another loop. Both loops must be locked. */ static inline void sk_close(sock *s) { rfree(&s->r); } /* Explicitly close socket */ diff --git a/sysdep/unix/socket.c b/sysdep/unix/socket.c index 890014be..0154f10b 100644 --- a/sysdep/unix/socket.c +++ b/sysdep/unix/socket.c @@ -1379,7 +1379,7 @@ err: } int -sk_open_unix(sock *s, struct birdloop *loop, char *name) +sk_open_unix(sock *s, struct birdloop *loop, const char *name) { struct sockaddr_un sa; int fd; diff --git a/sysdep/unix/unix.h b/sysdep/unix/unix.h index 71bc7a6c..eb8e4b2c 100644 --- a/sysdep/unix/unix.h +++ b/sysdep/unix/unix.h @@ -113,7 +113,6 @@ extern volatile sig_atomic_t async_shutdown_flag; void io_init(void); void io_loop(void); void io_log_dump(void); -int sk_open_unix(struct birdsock *s, struct birdloop *, char *name); enum rf_mode { RF_APPEND = 1,