From: Alan T. DeKok Date: Tue, 23 Jan 2024 13:59:17 +0000 (-0500) Subject: Linux has AF_FILE==AF_LOCAL X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=655225358e26fd4f2d6198f997e53fa51200e616;p=thirdparty%2Ffreeradius-server.git Linux has AF_FILE==AF_LOCAL so use our own AF_FILE_BIO --- diff --git a/src/lib/bio/fd.c b/src/lib/bio/fd.c index ab22527083e..03130772dac 100644 --- a/src/lib/bio/fd.c +++ b/src/lib/bio/fd.c @@ -748,7 +748,7 @@ static int fr_bio_fd_init_file(fr_bio_fd_t *my) int fr_bio_fd_init_connected(fr_bio_fd_t *my) { - if (my->info.socket.af == AF_FILE) return fr_bio_fd_init_file(my); + if (my->info.socket.af == AF_FILE_BIO) return fr_bio_fd_init_file(my); /* * Connected datagrams must have real IPs diff --git a/src/lib/bio/fd.h b/src/lib/bio/fd.h index c175851c59c..dd52570b76b 100644 --- a/src/lib/bio/fd.h +++ b/src/lib/bio/fd.h @@ -32,9 +32,9 @@ RCSIDH(lib_bio_fd_h, "$Id$") #include /* - * Local hack. + * Local hack. AF_FILE is a synonym for AF_LOCAL on some platforms. */ -#define AF_FILE (INT_MAX) +#define AF_FILE_BIO (INT_MAX) /** Per-packet context * diff --git a/src/lib/bio/fd_open.c b/src/lib/bio/fd_open.c index 59b82bcea88..2dc75d96757 100644 --- a/src/lib/bio/fd_open.c +++ b/src/lib/bio/fd_open.c @@ -771,7 +771,7 @@ int fr_bio_fd_open(fr_bio_t *bio, fr_bio_fd_config_t const *cfg) /* * Filenames overload the #fr_socket_t for now. */ - my->info.socket.af = AF_FILE; + my->info.socket.af = AF_FILE_BIO; my->info.socket.type = SOCK_STREAM; my->info.socket.unix.path = cfg->filename;