aboutsummaryrefslogtreecommitdiff
path: root/scripts/basic
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2017-02-01 22:10:45 +0100
committerRon Yorston <rmy@pobox.com>2017-07-14 13:47:31 +0100
commitb41c851312876dbf146fb674265b86c72ed611ab (patch)
tree039df84c471a7271495e7c94a095aa14cd8614c2 /scripts/basic
parent213b279baaae27a4285eb354f11e3c3b1986d129 (diff)
downloadbusybox-w32-b41c851312876dbf146fb674265b86c72ed611ab.tar.gz
busybox-w32-b41c851312876dbf146fb674265b86c72ed611ab.tar.bz2
busybox-w32-b41c851312876dbf146fb674265b86c72ed611ab.zip
fixdep: fix assumption that `long` is as large as `void *`
It is not. At least not in general. And in particular not on 64-bit Windows, where sizeof(long) == 4. What the code wanted to use is actually called intptr_t. Note: `intptr_t` is a C99 feature. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Diffstat (limited to 'scripts/basic')
-rw-r--r--scripts/basic/fixdep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index d3aa4e390..9f461a65b 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -353,7 +353,7 @@ void do_config_file(char *filename)
353 return; 353 return;
354 } 354 }
355 map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); 355 map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
356 if ((long) map == -1) { 356 if ((intptr_t) map == -1) {
357 perror("fixdep: mmap"); 357 perror("fixdep: mmap");
358 close(fd); 358 close(fd);
359 return; 359 return;
@@ -428,7 +428,7 @@ void print_deps(void)
428 return; 428 return;
429 } 429 }
430 map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); 430 map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
431 if ((long) map == -1) { 431 if ((intptr_t) map == -1) {
432 perror("fixdep: mmap"); 432 perror("fixdep: mmap");
433 close(fd); 433 close(fd);
434 return; 434 return;