Bug 131351 - pmake assumes two first readdir() calls returns "." and ".."
pmake assumes two first readdir() calls returns "." and ".."
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: pmake (Show other bugs)
2
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-08-31 08:53 EDT by David Eriksson
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version: 1.45-16
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-09 04:00:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Fix that uses the same code as FreeBSD to fix the bug. (1.05 KB, patch)
2004-08-31 08:54 EDT, David Eriksson
no flags Details | Diff
Version 2 of fix that uses the same code as FreeBSD to fix the bug. (1.97 KB, patch)
2004-08-31 09:02 EDT, David Eriksson
no flags Details | Diff

  None (edit)
Description David Eriksson 2004-08-31 08:53:31 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7)
Gecko/20040615 Firefox/0.9

Description of problem:
In Dir_AddDir() in dir.c the following code can be found:

	    /*
	     * Skip the first two entries -- these will *always* be . and ..
	     */
	    (void)readdir(d);
	    (void)readdir(d);

The comment is a lie!

This bad behavior is corrected in the FreeBSD version of pmake. I will
attach a patch to this bug report with the FreeBSD fix.

Version-Release number of selected component (if applicable):
pmake-1.45-14

How reproducible:
Sometimes

Steps to Reproduce:
mkdir bug
cd bug
touch access_network.c
touch stuff.c
cat >Makefile
default: stuff.o access_network.o
 
.c.o:
        $(CC) $(CFLAGS) -c ${.IMPSRC}
^D
pmake

Actual Results:  $ pmake
cc -O -c stuff.c
make: don't know how to make access_network.o. Stop


Expected Results:  $ pmake
cc -O -c stuff.c
cc -O -c access_network.c


Additional info:
Comment 1 David Eriksson 2004-08-31 08:54:32 EDT
Created attachment 103286 [details]
Fix that uses the same code as FreeBSD to fix the bug.
Comment 2 David Eriksson 2004-08-31 08:59:33 EDT
The patch was not complete, new patch coming soon!
Comment 3 David Eriksson 2004-08-31 09:02:52 EDT
Created attachment 103287 [details]
Version 2 of fix that uses the same code as FreeBSD to fix the bug.
Comment 4 Jakub Jelinek 2004-09-09 04:00:18 EDT
Should be fixed in 1.45-16 in rawhide.  Thanks.

Note You need to log in before you can comment on or make changes to this bug.