s3:ctdbd_conn: Fix the build on FreeBSD
authorMartin Schwenke <martin@meltin.net>
Tue, 20 Oct 2020 03:47:20 +0000 (14:47 +1100)
committerMartin Schwenke <martins@samba.org>
Tue, 20 Oct 2020 07:22:08 +0000 (07:22 +0000)
Commit 6b9564c1084d8dc7319857fac984808571ef0eb9 broke the build on
FreeBSD:

[2321/3909] Compiling source3/smbd/process.c
../../source3/smbd/process.c:2797:10: error: use of undeclared identifier 'EREMOTEIO'
                return EREMOTEIO;
                       ^
../../source3/smbd/process.c:2833:14: error: use of undeclared identifier 'EREMOTEIO'
                if (ret == EREMOTEIO) {
                           ^
2 errors generated.

Use one of the POSIX error codes instead.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Tue Oct 20 07:22:08 UTC 2020 on sn-devel-184

source3/smbd/process.c

index 4cf537200679a2c3bc7cadd9e0e6df66102ca893..9e861554fa7b6bf997e55856cf7b08c338731a80 100644 (file)
@@ -2794,7 +2794,7 @@ static int match_cluster_movable_ip(uint32_t total_ip_count,
        };
 
        if (is_movable_ip && sockaddr_equal(&pub_ip.u.sa, &srv_ip.u.sa)) {
-               return EREMOTEIO;
+               return EADDRNOTAVAIL;
        }
 
        return 0;
@@ -2830,7 +2830,7 @@ static NTSTATUS smbd_register_ips(struct smbXsrv_connection *xconn,
                ret = ctdbd_public_ip_foreach(cconn,
                                              match_cluster_movable_ip,
                                              srv);
-               if (ret == EREMOTEIO) {
+               if (ret == EADDRNOTAVAIL) {
                        xconn->has_cluster_movable_ip = true;
                        DBG_DEBUG("cluster movable IP on %s\n",
                                  smbXsrv_connection_dbg(xconn));