s3: fix build on systems without O_NOFOLLOW
authorBjörn Jacke <bj@sernet.de>
Sun, 10 Jun 2012 18:00:03 +0000 (20:00 +0200)
committerBjoern Jacke <bj@sernet.de>
Sun, 10 Jun 2012 19:38:08 +0000 (21:38 +0200)
source3/smbd/open.c

index cb43dd28caa2b47da532f85eea9ffdd405726311..189614a4b96c3f89a0c9a728120b9bb6e6564ea4 100644 (file)
@@ -291,8 +291,8 @@ static NTSTATUS fd_open(struct connection_struct *conn,
 
        fsp->fh->fd = SMB_VFS_OPEN(conn, smb_fname, fsp, flags, mode);
        if (fsp->fh->fd == -1) {
-#ifdef O_NOFOLLOW
                int posix_errno = errno;
+#ifdef O_NOFOLLOW
 #if defined(ENOTSUP) && defined(OSF1)
                /* handle special Tru64 errno */
                if (errno == ENOTSUP) {