Build farm patch Samba 3, smb_share_modes.[ch]

Steve Williams steve at celineandsteve.com
Sun Sep 11 04:56:51 GMT 2005


Hi,

Two small patches to get samba_3_0 to compile on my OpenBSD 3.7 i386 
system in the build farm

There is no "stdint.h" on OpenBSD.  The configure script determines this 
correctly, but the actual program doesn't do the right checks.  For the 
first patch, I took the logic from the "configure" script.  I figure if 
it's correct there, it should be ok to use in the source code.  (and it 
works).

The second patch resolves an inconsistency between the ".h" file and the 
".c" file.  I wasn't sure which way to go, but it looked like changing 
to uint64_t remained consistent with the other functions.

With these, samba_3_0 compiles on OpenBSD 3.7-current.

Cheers,
Steve


--- source/include/smb_share_modes.h.org        Sat Sep 10 18:45:21 2005
+++ source/include/smb_share_modes.h    Sat Sep 10 18:45:40 2005
@@ -25,7 +25,13 @@
 extern "C" {
 #endif

-#include <stdint.h>
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
 #include "tdb.h"

 /* Database context handle. */

--- source/libsmb/smb_share_modes.c.org Sat Sep 10 18:47:44 2005
+++ source/libsmb/smb_share_modes.c     Sat Sep 10 18:47:48 2005
@@ -94,8 +94,8 @@
 }
                                                                                

 int smb_unlock_share_mode_entry(struct smbdb_ctx *db_ctx,
-                                dev_t dev,
-                                ino_t ino)
+                                uint64_t dev,
+                                uint64_t ino)
 {
        return tdb_chainunlock(db_ctx->smb_tdb, get_locking_key(dev, ino));
 }



More information about the samba-technical mailing list