aboutsummaryrefslogtreecommitdiff
path: root/scripts/basic/fixdep.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2024-09-28 08:13:32 +0100
committerRon Yorston <rmy@pobox.com>2024-09-28 08:13:32 +0100
commit431e2704c17d5c0e51a0cbebfb1105bd4962b3f7 (patch)
tree6ff19e48cdcab8ba8176d22813d39a375399a610 /scripts/basic/fixdep.c
parent940f40e371695d6b247f4b406e7eb580fb91e866 (diff)
parentdff444bc375e6eb4c6775dbfc753ba71b46e9797 (diff)
downloadbusybox-w32-431e2704c17d5c0e51a0cbebfb1105bd4962b3f7.tar.gz
busybox-w32-431e2704c17d5c0e51a0cbebfb1105bd4962b3f7.tar.bz2
busybox-w32-431e2704c17d5c0e51a0cbebfb1105bd4962b3f7.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'scripts/basic/fixdep.c')
-rw-r--r--scripts/basic/fixdep.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index 1ae25c919..47a0cee07 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -107,6 +107,7 @@
107#ifndef __MINGW32__ 107#ifndef __MINGW32__
108#include <sys/mman.h> 108#include <sys/mman.h>
109#endif 109#endif
110#include <errno.h>
110#include <unistd.h> 111#include <unistd.h>
111#include <fcntl.h> 112#include <fcntl.h>
112#include <string.h> 113#include <string.h>
@@ -347,7 +348,10 @@ void do_config_file(char *filename)
347 perror(filename); 348 perror(filename);
348 exit(2); 349 exit(2);
349 } 350 }
350 fstat(fd, &st); 351 if (fstat(fd, &st) < 0) {
352 fprintf(stderr, "fixdep: fstat %s %s\n", filename, strerror(errno));
353 exit(2);
354 }
351 if (st.st_size == 0) { 355 if (st.st_size == 0) {
352 close(fd); 356 close(fd);
353 return; 357 return;
@@ -425,7 +429,10 @@ void print_deps(void)
425 perror(depfile); 429 perror(depfile);
426 exit(2); 430 exit(2);
427 } 431 }
428 fstat(fd, &st); 432 if (fstat(fd, &st) < 0) {
433 fprintf(stderr, "fixdep: fstat %s %s\n", depfile, strerror(errno));
434 exit(2);
435 }
429 if (st.st_size == 0) { 436 if (st.st_size == 0) {
430 fprintf(stderr,"fixdep: %s is empty\n",depfile); 437 fprintf(stderr,"fixdep: %s is empty\n",depfile);
431 close(fd); 438 close(fd);