Bug 3806 - makedev has 3 arguments in qnx
makedev has 3 arguments in qnx
Status: CLOSED FIXED
Product: rsync
Classification: Unclassified
Component: core
2.6.8
Other Other
: P3 normal
: ---
Assigned To: Wayne Davison
Rsync QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-26 06:13 UTC by cooke
Modified: 2006-10-15 13:26 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cooke 2006-05-26 06:13:45 UTC
Hello,

I cross-compiled rsync to QNX on a sh4 embedded system. When compiling the file flist.c I get the error that makedev requires 3 arguments but only 2 are supplied.

I went and looked at how it is defined in QNX and according to the QNX website (http://www.qnx.com/developers/docs/6.3.0SP1/neutrino/lib_ref/s/stat.html) the makedev works as follows in QNX:

makedev( node, major, minor)
    Build a device ID from the given numbers. Currently, the node argument isn't used and must be zero

So what I did to fix the problem is defined:
#define MAKEDEV(a,b) makedev(0,a,b)

and then replaced makedev with MAKEDEV in the file flist.c The code compiled and appears to be working properly.

So it would be good to add a test to the configure script that tests for the 3 argument form of makedev and sets the define shown above accordingly and also handles the mkdev define mentioned in bug report 2357 (https://bugzilla.samba.org/show_bug.cgi?id=2357) that is currently handled.

Anyway hope this helps someone.

Adrian
Comment 1 Wayne Davison 2006-07-09 23:27:37 UTC
The version in CVS now has a configure script that checks if makedev() takes 3 args, and the software now uses this information to define the right MAKEDEV() macro.