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,