svn commit: samba r24965 - in branches/SAMBA_3_0_25/source: include libsmb

idra at samba.org idra at samba.org
Wed Sep 5 12:43:45 GMT 2007


Author: idra
Date: 2007-09-05 12:43:39 +0000 (Wed, 05 Sep 2007)
New Revision: 24965

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24965

Log:

"open" is a macro in newest glibc in rawhide
this patch let samba compile again


Modified:
   branches/SAMBA_3_0_25/source/include/vfs_macros.h
   branches/SAMBA_3_0_25/source/libsmb/libsmb_compat.c
   branches/SAMBA_3_0_25/source/libsmb/libsmbclient.c


Changeset:
Modified: branches/SAMBA_3_0_25/source/include/vfs_macros.h
===================================================================
--- branches/SAMBA_3_0_25/source/include/vfs_macros.h	2007-09-05 12:41:13 UTC (rev 24964)
+++ branches/SAMBA_3_0_25/source/include/vfs_macros.h	2007-09-05 12:43:39 UTC (rev 24965)
@@ -47,7 +47,7 @@
 #define SMB_VFS_CLOSEDIR(conn, dir) ((conn)->vfs.ops.closedir((conn)->vfs.handles.closedir, dir))
     
 /* File operations */
-#define SMB_VFS_OPEN(conn, fname, fsp, flags, mode) ((conn)->vfs.ops.open((conn)->vfs.handles.open, (fname), (fsp), (flags), (mode)))
+#define SMB_VFS_OPEN(conn, fname, fsp, flags, mode) (((conn)->vfs.ops.open)((conn)->vfs.handles.open, (fname), (fsp), (flags), (mode)))
 #define SMB_VFS_CLOSE(fsp, fd) ((fsp)->conn->vfs.ops.close_fn((fsp)->conn->vfs.handles.close_hnd, (fsp), (fd)))
 #define SMB_VFS_READ(fsp, fd, data, n) ((fsp)->conn->vfs.ops.read((fsp)->conn->vfs.handles.read, (fsp), (fd), (data), (n)))
 #define SMB_VFS_PREAD(fsp, fd, data, n, off) ((fsp)->conn->vfs.ops.pread((fsp)->conn->vfs.handles.pread, (fsp), (fd), (data), (n), (off)))
@@ -163,7 +163,7 @@
 #define SMB_VFS_OPAQUE_CLOSEDIR(conn, dir) ((conn)->vfs_opaque.ops.closedir((conn)->vfs_opaque.handles.closedir, dir))
     
 /* File operations */
-#define SMB_VFS_OPAQUE_OPEN(conn, fname, fsp, flags, mode) ((conn)->vfs_opaque.ops.open((conn)->vfs_opaque.handles.open, (fname), (fsp), (flags), (mode)))
+#define SMB_VFS_OPAQUE_OPEN(conn, fname, fsp, flags, mode) (((conn)->vfs_opaque.ops.open)((conn)->vfs_opaque.handles.open, (fname), (fsp), (flags), (mode)))
 #define SMB_VFS_OPAQUE_CLOSE(fsp, fd) ((fsp)->conn->vfs_opaque.ops.close_fn((fsp)->conn->vfs_opaque.handles.close_hnd, (fsp), (fd)))
 #define SMB_VFS_OPAQUE_READ(fsp, fd, data, n) ((fsp)->conn->vfs_opaque.ops.read((fsp)->conn->vfs_opaque.handles.read, (fsp), (fd), (data), (n)))
 #define SMB_VFS_OPAQUE_PREAD(fsp, fd, data, n, off) ((fsp)->conn->vfs_opaque.ops.pread((fsp)->conn->vfs_opaque.handles.pread, (fsp), (fd), (data), (n), (off)))
@@ -280,7 +280,7 @@
 #define SMB_VFS_NEXT_CLOSEDIR(handle, dir) ((handle)->vfs_next.ops.closedir((handle)->vfs_next.handles.closedir, dir))
     
 /* File operations */
-#define SMB_VFS_NEXT_OPEN(handle, fname, fsp, flags, mode) ((handle)->vfs_next.ops.open((handle)->vfs_next.handles.open, (fname), (fsp), (flags), (mode)))
+#define SMB_VFS_NEXT_OPEN(handle, fname, fsp, flags, mode) (((handle)->vfs_next.ops.open)((handle)->vfs_next.handles.open, (fname), (fsp), (flags), (mode)))
 #define SMB_VFS_NEXT_CLOSE(handle, fsp, fd) ((handle)->vfs_next.ops.close_fn((handle)->vfs_next.handles.close_hnd, (fsp), (fd)))
 #define SMB_VFS_NEXT_READ(handle, fsp, fd, data, n) ((handle)->vfs_next.ops.read((handle)->vfs_next.handles.read, (fsp), (fd), (data), (n)))
 #define SMB_VFS_NEXT_PREAD(handle, fsp, fd, data, n, off) ((handle)->vfs_next.ops.pread((handle)->vfs_next.handles.pread, (fsp), (fd), (data), (n), (off)))

Modified: branches/SAMBA_3_0_25/source/libsmb/libsmb_compat.c
===================================================================
--- branches/SAMBA_3_0_25/source/libsmb/libsmb_compat.c	2007-09-05 12:41:13 UTC (rev 24964)
+++ branches/SAMBA_3_0_25/source/libsmb/libsmb_compat.c	2007-09-05 12:43:39 UTC (rev 24965)
@@ -157,7 +157,7 @@
 	SMBCFILE * file;
 	int fd;
 
-	file = statcont->open(statcont, furl, flags, mode);
+	file = (statcont->open)(statcont, furl, flags, mode);
 	if (!file)
 		return -1;
 

Modified: branches/SAMBA_3_0_25/source/libsmb/libsmbclient.c
===================================================================
--- branches/SAMBA_3_0_25/source/libsmb/libsmbclient.c	2007-09-05 12:41:13 UTC (rev 24964)
+++ branches/SAMBA_3_0_25/source/libsmb/libsmbclient.c	2007-09-05 12:43:39 UTC (rev 24965)
@@ -5980,7 +5980,7 @@
 
         /* What if the path is empty, or the file exists? */
 
-        return context->open(context, fname, O_WRONLY, 666);
+        return (context->open)(context, fname, O_WRONLY, 666);
 
 }
 
@@ -6021,7 +6021,7 @@
 
         /* Try to open the file for reading ... */
 
-        if ((long)(fid1 = c_file->open(c_file, fname, O_RDONLY, 0666)) < 0) {
+        if ((long)(fid1 = (c_file->open)(c_file, fname, O_RDONLY, 0666)) < 0) {
                 
                 DEBUG(3, ("Error, fname=%s, errno=%i\n", fname, errno));
                 return -1;  /* smbc_open sets errno */



More information about the samba-cvs mailing list