aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-01-20 01:47:44 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-01-20 01:47:44 +0000
commit91f20ab510a6ddab49dd89f8c8876912d4537be0 (patch)
treef5cd515adbbc035cbc6b65df7569fcd04545a2b3
parente0554434126541e943bf0f1d90a475252392bf6f (diff)
downloadbusybox-w32-91f20ab510a6ddab49dd89f8c8876912d4537be0.tar.gz
busybox-w32-91f20ab510a6ddab49dd89f8c8876912d4537be0.tar.bz2
busybox-w32-91f20ab510a6ddab49dd89f8c8876912d4537be0.zip
fixes for amd64 compilation
-rw-r--r--networking/dnsd.c9
-rw-r--r--networking/isrv.c8
-rwxr-xr-xscripts/objsizes2
3 files changed, 11 insertions, 8 deletions
diff --git a/networking/dnsd.c b/networking/dnsd.c
index c3bd1610b..71f50423d 100644
--- a/networking/dnsd.c
+++ b/networking/dnsd.c
@@ -184,23 +184,24 @@ static int table_lookup(uint16_t type, uint8_t * as, uint8_t * qs)
184 struct dns_entry *d=dnsentry; 184 struct dns_entry *d=dnsentry;
185 185
186 do { 186 do {
187#ifdef DEBUG 187#if DEBUG
188 char *p,*q; 188 char *p,*q;
189 q = (char *)&(qs[1]); 189 q = (char *)&(qs[1]);
190 p = &(d->name[1]); 190 p = &(d->name[1]);
191 fprintf(stderr, "\n%s: %d/%d p:%s q:%s %d", 191 fprintf(stderr, "\n%s: %d/%d p:%s q:%s %d",
192 __FUNCTION__, strlen(p), (int)(d->name[0]), p, q, strlen(q)); 192 __FUNCTION__, (int)strlen(p), (int)(d->name[0]),
193 p, q, (int)strlen(q));
193#endif 194#endif
194 if (type == REQ_A) { /* search by host name */ 195 if (type == REQ_A) { /* search by host name */
195 for (i = 1; i <= (int)(d->name[0]); i++) 196 for (i = 1; i <= (int)(d->name[0]); i++)
196 if (tolower(qs[i]) != d->name[i]) 197 if (tolower(qs[i]) != d->name[i])
197 break; 198 break;
198 if (i > (int)(d->name[0])) { 199 if (i > (int)(d->name[0])) {
199#ifdef DEBUG 200#if DEBUG
200 fprintf(stderr, " OK"); 201 fprintf(stderr, " OK");
201#endif 202#endif
202 strcpy((char *)as, d->ip); 203 strcpy((char *)as, d->ip);
203#ifdef DEBUG 204#if DEBUG
204 fprintf(stderr, " as:%s\n", as); 205 fprintf(stderr, " as:%s\n", as);
205#endif 206#endif
206 return 0; 207 return 0;
diff --git a/networking/isrv.c b/networking/isrv.c
index 5193f30f3..f0df2229c 100644
--- a/networking/isrv.c
+++ b/networking/isrv.c
@@ -190,9 +190,10 @@ static void handle_accept(isrv_state_t *state, int fd)
190{ 190{
191 int n, newfd; 191 int n, newfd;
192 192
193 fcntl(fd, F_SETFL, (int)(PARAM_TBL[0]) | O_NONBLOCK); 193 /* suppress gcc warning "cast from ptr to int of different size" */
194 fcntl(fd, F_SETFL, (int)(ptrdiff_t)(PARAM_TBL[0]) | O_NONBLOCK);
194 newfd = accept(fd, NULL, 0); 195 newfd = accept(fd, NULL, 0);
195 fcntl(fd, F_SETFL, (int)(PARAM_TBL[0])); 196 fcntl(fd, F_SETFL, (int)(ptrdiff_t)(PARAM_TBL[0]));
196 if (newfd < 0) { 197 if (newfd < 0) {
197 if (errno == EAGAIN) return; 198 if (errno == EAGAIN) return;
198 /* Most probably someone gave us wrong fd type 199 /* Most probably someone gave us wrong fd type
@@ -299,7 +300,8 @@ void isrv_run(
299 isrv_register_fd(state, /*peer:*/ 0, listen_fd); 300 isrv_register_fd(state, /*peer:*/ 0, listen_fd);
300 isrv_want_rd(state, listen_fd); 301 isrv_want_rd(state, listen_fd);
301 /* remember flags to make blocking<->nonblocking switch faster */ 302 /* remember flags to make blocking<->nonblocking switch faster */
302 PARAM_TBL[0] = (void*) (fcntl(listen_fd, F_GETFL, 0)); 303 /* (suppress gcc warning "cast from ptr to int of different size") */
304 PARAM_TBL[0] = (void*)(ptrdiff_t)(fcntl(listen_fd, F_GETFL, 0));
303 305
304 while (1) { 306 while (1) {
305 struct timeval tv; 307 struct timeval tv;
diff --git a/scripts/objsizes b/scripts/objsizes
index ff1c6ed10..44fbce1aa 100755
--- a/scripts/objsizes
+++ b/scripts/objsizes
@@ -2,7 +2,7 @@
2 2
3printf "%9s %11s %9s %9s %s\n" "text+data" text+rodata rwdata bss filename 3printf "%9s %11s %9s %9s %s\n" "text+data" text+rodata rwdata bss filename
4find -name '*.o' | grep -v '^\./scripts/' | grep -vF built-in.o \ 4find -name '*.o' | grep -v '^\./scripts/' | grep -vF built-in.o \
5| sed 's:^\./::' | xargs size | grep '^ *[0-9]' \ 5| sed 's:^\./::' | xargs "${CROSS_COMPILE}size" | grep '^ *[0-9]' \
6| while read text data bss dec hex filename; do 6| while read text data bss dec hex filename; do
7 printf "%9d %11d %9d %9d %s\n" $((text+data)) $text $data $bss "$filename" 7 printf "%9d %11d %9d %9d %s\n" $((text+data)) $text $data $bss "$filename"
8done | sort -r 8done | sort -r