Apply these patches as well ... not sure if they all build. They don't on
authorRichard Sharpe <sharpe@samba.org>
Fri, 24 Oct 2003 20:24:05 +0000 (20:24 +0000)
committerRichard Sharpe <sharpe@samba.org>
Fri, 24 Oct 2003 20:24:05 +0000 (20:24 +0000)
FreeBSD 4.3. They might on Linux.
(This used to be commit 1f115c95d635377a36c0a3a1f56b4b8def04fd7e)

examples/libsmbclient/Makefile
examples/libsmbclient/tree.c

index 5fe9977c0ae1bc0885bb06683dd8a2fdad88e1de..e7c82a3aee6cab1884fc33585e5a224536e829bc 100644 (file)
@@ -2,16 +2,19 @@
 CC = gcc
 
 SAMBA_INCL = ../../source/include
+EXTLIB_INCL = -I/usr/include/gtk-1.2 \
+             -I/usr/include/glib-1.2 \
+             -I/usr/lib/glib/include
 
-CFLAGS = -I$(SAMBA_INCL)
+CFLAGS = -I$(SAMBA_INCL) $(EXTLIB_INCL)
 
 LDFLAGS = -L/usr/lib
 
-all: testsmbc tree
+all: testsmbc tree testacl
 
 testsmbc: testsmbc.o 
        @echo Linking testsmbc
-       @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lsmbclient -L/usr/local/lib
+       $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lsmbclient -L/usr/local/lib
 
 testsmbc-static: testsmbc.o 
        @echo Linking testsmbc
@@ -21,5 +24,9 @@ tree: tree.o
        @echo Linking tree
        @$(CC) `gtk-config --cflags` $(CFLAGS) $(LDFLAGS) -o $@ `gtk-config --libs` -lsmbclient $<
 
+testacl: testacl.o
+       @echo Linking testacl
+       @$(CC) `gtk-config --cflags` $(CFLAGS) $(LDFLAGS) -o $@ `gtk-config --libs` -lsmbclient -lpopt $<
+
 clean:
        @rm -f *.o *~
index 8dc9cc408b38fe120dcf2ac1a4cb602b90ba59f2..f50b3670cff23a8d694777eea13ec391238a7736 100644 (file)
@@ -706,9 +706,9 @@ int main( int   argc,
 
   /* Now, build the top level display ... */
 
-  if ((dh = smbc_opendir("smb:///")) < 0) {
+  if ((dh = smbc_opendir("smb://")) < 0) {
 
-    fprintf(stderr, "Could not list default workgroup: smb:///: %s\n",
+    fprintf(stderr, "Could not list workgroups: smb://: %s\n",
            strerror(errno));
 
     exit(1);