[prev in list] [next in list] [prev in thread] [next in thread] 

List:       samba-technical
Subject:    smbmount, smbmnt, smbumount on RedHat...
From:       "Michael H. Warfield" <mhw () wittsend ! com>
Date:       1998-05-19 20:16:02
[Download RAW message or body]

Hello all...

	I've been trying to get the latest CVS code to compile on both
RedHat 4.2 and RedHat 5.0 with smbmount smbumount and smbmnt for the
latest Linux kernels.  I found that I had to make the following changes
to the Makefile, smbmnt.c, and smbumount.c in order to get them to compile.
The changes to smbmnt.c are only required for RedHat 5.0 with glibc.  I
also had to make a change in the Linux header file <linux/dirent.h> in
order to get smbmount.c to compile on RedHat 5.0 with glibc, but I will
take that up with the Linux gang.

	There may be better ways to have accomplished this, but this seems
to have been the minimum set of changes for me.  I also do not know how these
changes would fare under Slackware.

	Here are the changes:

diff -u source.old/Makefile source/Makefile
--- source.old/Makefile	Tue May 19 15:58:28 1998
+++ source/Makefile	Tue May 19 15:36:31 1998
@@ -747,7 +747,7 @@
 MNT_OBJ = smbmnt.o
 
 # object files for smbumount
-UMOUNT_OBJ = smbumount.o
+UMOUNT_OBJ = smbumount.o $(UTILOBJ)
 
 # object files for smbstatus
 STATUS_OBJ = status.o $(UTILOBJ) $(LOCKOBJ) 
@@ -811,7 +811,7 @@
 
 smbumount: $(UMOUNT_OBJ)
 	@echo Linking smbumount
-	@$(CC) $(CFLAGS) -o smbumount $(UMOUNT_OBJ)
+	@$(CC) $(CFLAGS) -o smbumount $(UMOUNT_OBJ) $(LIBS)
 
 smbtorture: torture.o getsmbpass.o $(UTILOBJ) $(CLIENTUTIL)
 	@echo Linking smbtorture
diff -u source.old/smbmnt.c source/smbmnt.c
--- source.old/smbmnt.c	Thu Apr  2 12:32:51 1998
+++ source/smbmnt.c	Tue May 19 15:55:30 1998
@@ -27,7 +27,9 @@
 #include <sys/mount.h>
 #include <mntent.h>
 
+#ifndef GLIBC2
 #include <linux/fs.h>
+#endif
 #include <linux/smb.h>
 #include <linux/smb_mount.h>
 
diff -u source.old/smbumount.c source/smbumount.c
--- source.old/smbumount.c	Tue May 12 08:56:27 1998
+++ source/smbumount.c	Tue May 19 15:34:45 1998
@@ -5,32 +5,12 @@
  *
  */
 
-#include <stdio.h>
-#include <string.h>
-#include <signal.h>
-#include <pwd.h>
-#include <grp.h>
-#include <sys/socket.h>
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <netdb.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-/* #include <sys/wait.h> */  /* generates a warning here */
+#include "includes.h"
 extern pid_t waitpid(pid_t, int *, int);
-#include <sys/errno.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <ctype.h>
-#include <stdlib.h>
 #include <sys/mount.h>
 #include <mntent.h>
 
 #include <sys/ioctl.h>
-#include <linux/fs.h>
-#include <linux/smb.h>
-#include <linux/smb_mount.h>
 #include <linux/smb_fs.h>
 
 static char *progname;


	Hope this is useful.

	Regards,
	Mike
-- 
 Michael H. Warfield    |  (770) 985-6132   |  mhw@WittsEnd.com
  (The Mad Wizard)      |  (770) 925-8248   |  http://www.wittsend.com/mhw/
  NIC whois:  MHW9      |  An optimist believes we live in the best of all
 PGP Key: 0xDF1DD471    |  possible worlds.  A pessimist is sure of it!

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic