The Samba-Bugzilla – Bug 3806
makedev has 3 arguments in qnx
Last modified: 2006-10-15 13:26:34 UTC
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.
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.