|
Re: makdev() with two / three parameters?
|
01/22/2008 7:48 AM
post4494
|
Re: makdev() with two / three parameters?
On Tue, Jan 22, 2008 at 05:10:19AM -0500, Peter Kalbus wrote:
> during porting rpm5 to qnx i detected a difference in the number of parameters for makedev():
>
> on netbsd it's defined as:
> #define makedev(x,y) <...>
>
> on qnx it's defined as:
> #define makedev(node,major,minor) <...>
>
> searching the internet i got the hint to change the calls on qnx in the following way (setting 'node' fixed to '0'):
>
> makedev(x,y) --> makedev(0,x,y)
>
> okay, at least it compiles and seams to run. but i'm not sure, that it's working for all circumstances.
>
> is there any known drawback, when doing it the mentioned way?
>
> -piet
Most (all?) 3rd party code isn't QNET aware so to be totally
correct it should be:
#include <sys/netmgr.h>
makedev(ND_LOCAL_NODE, x, y);
Which is equivalent to what you had.
-seanb
|
|
|