]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Linux has AF_FILE==AF_LOCAL
authorAlan T. DeKok <aland@freeradius.org>
Tue, 23 Jan 2024 13:59:17 +0000 (08:59 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 23 Jan 2024 13:59:17 +0000 (08:59 -0500)
so use our own AF_FILE_BIO

src/lib/bio/fd.c
src/lib/bio/fd.h
src/lib/bio/fd_open.c

index ab22527083e025e6e0acda442f045acbae660589..03130772dac67606d11058ffe3b5d6fe22111a1d 100644 (file)
@@ -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
index c175851c59c1f00cd6ac0ad5e2a146a99199c1e7..dd52570b76bdb1ef869b68d305819427c14a1749 100644 (file)
@@ -32,9 +32,9 @@ RCSIDH(lib_bio_fd_h, "$Id$")
 #include <fcntl.h>
 
 /*
- *     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
  *
index 59b82bcea8879e4eaa593cfc93fb65a91e4f1e66..2dc75d967579ab80cc5f7174960def00e4388665 100644 (file)
@@ -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;