From 8ebc170ec0e24bf73f10a688ed2bdcf60f869e36 Mon Sep 17 00:00:00 2001 From: ceriel Date: Tue, 7 Apr 1987 08:46:15 +0000 Subject: [PATCH] st_blksize does only exist on 4.2 systems --- lang/cem/libcc/gen/opendir.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lang/cem/libcc/gen/opendir.c b/lang/cem/libcc/gen/opendir.c index 28f3de393..82db49b36 100644 --- a/lang/cem/libcc/gen/opendir.c +++ b/lang/cem/libcc/gen/opendir.c @@ -15,10 +15,14 @@ char *name; long siz; extern char *malloc(); +#ifdef __BSD4_2 + siz = stbuf.st_blksize; +#else + siz = DIRBLKSIZ; +#endif if ((fd = open(name, 0)) == -1) return NULL; fstat(fd, &stbuf); - siz = stbuf.st_blksize; if (((stbuf.st_mode & S_IFDIR) == 0) || ((dirp = (DIR *)malloc(sizeof (DIR))) == NULL)) { close (fd); -- 2.34.1