fixes samba3 to use gawk instead of mawk
[openwrt/svn-archive/archive.git] / net / samba3 / patches / 110-compile_fixes.patch
1 Index: samba-3.0.24/source/Makefile
2 ===================================================================
3 --- samba-3.0.24.orig/source/Makefile 2008-08-07 11:15:02.000000000 +0200
4 +++ samba-3.0.24/source/Makefile 2008-08-07 11:18:28.000000000 +0200
5 @@ -10,8 +10,6 @@
6 SOURCEROOT=$(shell pwd)/../../../..
7 SHAREDLIBS=$(SOURCEROOT)/sharedlibs
8
9 -include ${SHAREDLIBS}/ar7def.mk
10 -
11 # AR7
12 # prefix=/usr/local/samba
13 prefix=/var/samba
14 @@ -22,25 +20,27 @@
15 LIBS= -lcrypt -ldl -lpthread
16 # AR7
17 # CC=gcc
18 -CC=${TARGET}-gcc
19 +CC?=${TARGET}-gcc
20 RANLIB = ${TARGET}-ranlib
21 AR = ${TARGET}-ar
22
23 SHLD=${CC} ${CFLAGS}
24 # AR7
25 # CFLAGS= -O -D_SAMBA_BUILD_
26 -CFLAGS= -Os -D_SAMBA_BUILD_ -DAVM_NO_PRINTING
27 -CFLAGS+= -DAVM_NO_POPT
28 +CFLAPGS?=
29 +CFLAGS+= -Os -D_SAMBA_BUILD_ -DAVM_NO_PRINTING
30 +#CFLAGS+= -DAVM_NO_POPT
31 CFLAGS+= -DAVM_SMALLER
32 -
33 +#CFLAGS+= -DSAMBA_DEBUG
34 # uncomment this to get debugs
35 # CFLAGS += -DSAMBA_DEBUG
36
37 # AR7
38 # CPPFLAGS= -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
39 -CPPFLAGS= -D_GNU_SOURCE
40 +CPPFLAGS?= -D_GNU_SOURCE
41 +CPPFLAGS+= -D_GNU_SOURCE
42 EXEEXT=
43 -LDFLAGS=
44 +LDFLAGS?=
45 AR=ar
46 LDSHFLAGS=-shared -Wl,-Bsymbolic
47 WINBIND_NSS_LDSHFLAGS=-shared -Wl,-Bsymbolic
48 @@ -238,7 +238,9 @@
49 lib/adt_tree.o lib/gencache.o $(TDB_OBJ) \
50 lib/module.o lib/ldap_escape.o \
51 lib/privileges.o lib/secdesc.o lib/secace.o lib/secacl.o \
52 - lib/arc4.o lib/sharesec.o lib/events.o lib/util_nscd.o
53 + lib/arc4.o lib/sharesec.o lib/events.o lib/util_nscd.o \
54 + popt/poptparse.o popt/popthelp.o popt/poptconfig.o \
55 + lib/popt_common.o popt/popt.o
56
57 LIB_NONSMBD_OBJ = $(LIB_OBJ) lib/dummysmbd.o lib/dummyroot.o
58
59 Index: samba-3.0.24/source/popt/popt.c
60 ===================================================================
61 --- samba-3.0.24.orig/source/popt/popt.c 2008-08-07 11:15:00.000000000 +0200
62 +++ samba-3.0.24/source/popt/popt.c 2008-08-07 11:15:02.000000000 +0200
63 @@ -10,13 +10,14 @@
64
65 #include "system.h"
66
67 -#if HAVE_FLOAT_H
68 +//#if HAVE_FLOAT_H
69 #include <float.h>
70 -#endif
71 +//#endif
72 #include <math.h>
73
74 #include "findme.h"
75 #include "poptint.h"
76 +#include "../include/config.h"
77
78 #ifdef MYDEBUG
79 /*@unchecked@*/
80 @@ -384,7 +385,7 @@
81 sprintf(s, "%s/%s", con->execPath, item->argv[0]);
82 argv[argc] = s;
83 } else {
84 - argv[argc] = findProgramPath(item->argv[0]);
85 + argv[argc] = ""/*findProgramPath(item->argv[0])*/;
86 }
87 if (argv[argc++] == NULL) return POPT_ERROR_NOARG;
88
89 @@ -1235,4 +1236,3 @@
90
91 return numargs;
92 }
93 -/*@=boundswrite@*/
94 Index: samba-3.0.24/source/smbd/server.c
95 ===================================================================
96 --- samba-3.0.24.orig/source/smbd/server.c 2008-08-07 11:15:02.000000000 +0200
97 +++ samba-3.0.24/source/smbd/server.c 2008-08-07 11:15:02.000000000 +0200
98 @@ -47,7 +47,7 @@
99 void _fLog(char *fmt, ...)
100 {
101 va_list va;
102 - FILE *fp = fopen("/var/tmp/smbd.log", "a");
103 + FILE *fp = fopen("/var/log/smbd.log", "a");
104 time_t t = time(0); /* LOG */
105
106 if (!fp) return;
107 @@ -63,7 +63,7 @@
108 void _fDebug(char *fmt, ...)
109 {
110 va_list va;
111 - FILE *fp = fopen("/var/tmp/smbd.log", "a");
112 + FILE *fp = fopen("/var/log/smbd.log", "a");
113 time_t t = time(0); /* LOG */
114
115 if (!fp) return;