summaryrefslogtreecommitdiffstats
path: root/package/nfs-server/patches/cross-compile-fix.patch
blob: 646a34a9ab2922da67b7ea87ad4df38bf2e583ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
diff -urN nfs-server-2.2beta47.old/configure nfs-server-2.2beta47/configure
--- nfs-server-2.2beta47.old/configure	1999-06-11 12:06:04.000000000 +0200
+++ nfs-server-2.2beta47/configure	2005-03-24 22:24:39.000000000 +0100
@@ -1960,7 +1960,7 @@
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+    { echo "configure: error: can not run test program while cross compiling" 1>&2; }
 else
 cat > conftest.$ac_ext <<EOF
 #line 1967 "configure"
@@ -1996,7 +1996,7 @@
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+    { echo "configure: error: can not run test program while cross compiling" 1>&2; }
 else
 cat > conftest.$ac_ext <<EOF
 #line 2003 "configure"
@@ -2032,7 +2032,7 @@
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+    { echo "configure: error: can not run test program while cross compiling" 1>&2; }
 else
 cat > conftest.$ac_ext <<EOF
 #line 2039 "configure"
@@ -2130,7 +2130,7 @@
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+    { echo "configure: error: can not run test program while cross compiling" 1>&2; }
 else
 cat > conftest.$ac_ext <<EOF
 #line 2137 "configure"
@@ -2166,7 +2166,7 @@
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+    { echo "configure: error: can not run test program while cross compiling" 1>&2; }
 else
 cat > conftest.$ac_ext <<EOF
 #line 2173 "configure"
@@ -2202,7 +2202,7 @@
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+    { echo "configure: error: can not run test program while cross compiling" 1>&2; }
 else
 cat > conftest.$ac_ext <<EOF
 #line 2209 "configure"
@@ -2238,7 +2238,7 @@
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+    { echo "configure: error: can not run test program while cross compiling" 1>&2; }
 else
 cat > conftest.$ac_ext <<EOF
 #line 2245 "configure"
@@ -2862,7 +2862,7 @@
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+    { echo "configure: error: can not run test program while cross compiling" 1>&2; }
 else
 cat > conftest.$ac_ext <<EOF
 #line 2869 "configure"
@@ -3089,7 +3089,7 @@
     
     # DEC Alpha running OSF/1
     if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+    { echo "configure: error: can not run test program while cross compiling" 1>&2; }
 else
 cat > conftest.$ac_ext <<EOF
 #line 3096 "configure"
@@ -3149,7 +3149,7 @@
     # SVR3
     if test -z "$space"; then
       if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+    { echo "configure: error: can not run test program while cross compiling" 1>&2; }
 else
 cat > conftest.$ac_ext <<EOF
 #line 3156 "configure"
@@ -3348,7 +3348,7 @@
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+    { echo "configure: error: can not run test program while cross compiling" 1>&2; }
 else
 cat > conftest.$ac_ext <<EOF
 #line 3355 "configure"
--- nfs-server-2.2beta47.old/logging.c	1998-10-30 17:11:22.000000000 +0100
+++ nfs-server-2.2beta47/logging.c	2005-03-24 22:47:44.000000000 +0100
@@ -14,6 +14,7 @@
  */
 
 #include "nfsd.h"
+#include <time.h>
 
 #ifdef HAVE_SYSLOG_H
 #include <syslog.h>
--- nfs-server-2.2beta47.old/fh.c	1999-11-10 10:41:14.000000000 +0100
+++ nfs-server-2.2beta47/fh.c	2005-03-24 22:50:50.000000000 +0100
@@ -50,6 +50,7 @@
  */
 
 #include <assert.h>
+#include <time.h>
 #include "nfsd.h"
 #include "rpcmisc.h"
 #include "signals.h"
@@ -350,7 +351,7 @@
 #ifndef ENABLE_DEVTAB
 	psi_t		dmajor, dminor;
 
-#if SIZEOF_DEV_T == 4
+#if (SIZEOF_DEV_T == 4)
 	/* This folds the upper 16 bits into bits 8..15, and
 	 * the lower 16 bits into bits 0..7
 	 */
--- nfs-server-2.2beta47.old/ugid_map.c	2005-03-24 22:34:56.000000000 +0100
+++ nfs-server-2.2beta47/ugid_map.c	2005-03-24 22:54:00.000000000 +0100
@@ -34,14 +34,8 @@
 #define UGID_CHUNK0_BYTES	(UGID_CHUNK * sizeof(idmap_t))
 #define UGID_EXPIRE		300		/* 5 minutes */
 
-/*
- * Make sure we get the right size for ugid_t
- */
-#if SIZEOF_UID_T != SIZEOF_GID_T
-#error Sorry, this code relies on sizeof(uid_t) == sizeof(gid_t)
-#endif
 
-#define UGID_BITS		(SIZEOF_UID_T * BITSPERBYTE)
+#define UGID_BITS		(sizeof(uid_t) * BITSPERBYTE)
 #define BITSTOLEVEL(b)		((UGID_BITS - (b)) / UGID_CHUNK_BITS - 1)
 #define UGID_LOWER(id, b)	((id) & ~((1 << (b)) - 1))
 #define UGID_UPPER(id, b)	(((id + (1 << (b))) & ~((1 << (b)) - 1))-1)