diff options
author | will <will@FreeBSD.org> | 2001-02-10 07:12:18 +0000 |
---|---|---|
committer | will <will@FreeBSD.org> | 2001-02-10 07:12:18 +0000 |
commit | 38719f8bca4e40c2972b6cae348e1e72417fbe72 (patch) | |
tree | 6b62d09b28cd9eeb4e187350a55b98b34145486a /usr.bin/make | |
parent | 7bdc444072634bfcb88a522bca59d95b60db344a (diff) | |
download | FreeBSD-src-38719f8bca4e40c2972b6cae348e1e72417fbe72.zip FreeBSD-src-38719f8bca4e40c2972b6cae348e1e72417fbe72.tar.gz |
Fix nasty bug where make(1) assumed that you could read the directory it
was in. This shall be MFC'd in about three days (probably not a good idea
to MFC the stylistic changes though - see below).
PR: 19978
Submitted by: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
Patch by: roam (slightly modified by me to use NULL not NIL)
Diffstat (limited to 'usr.bin/make')
-rw-r--r-- | usr.bin/make/dir.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.bin/make/dir.c b/usr.bin/make/dir.c index 0c16cc8..fa49cf4 100644 --- a/usr.bin/make/dir.c +++ b/usr.bin/make/dir.c @@ -223,6 +223,8 @@ Dir_Init () */ Dir_AddDir (openDirectories, "."); dot = (Path *) Lst_DeQueue (openDirectories); + if (dot == (Path *) NULL) + err(1, "cannot open current directory"); /* * We always need to have dot around, so we increment its reference count |