Getpwnam_r returning null with errno 25

I am calling getpwnam_r with all proper argument as below:-

rv = getpwnam_r(name, result, buffer, buflen);

This program runs fine on sol 8/9/10.
But on sol 11 it returns NULL with errno set to 25

(#define ENOTTY  25      /* Inappropriate ioctl for device       */)

All boxes are using NIS and my user id is in NIS.

What could be wrong on my sol11 box?

uname -a output:-
SunOS hostname 5.11 11.0 sun4v sparc SUNW,Sun-Fire-T200

Regards
Ranajit

There is a problem here. ENOTTY is not an error you can get from calling getpwnam().

The problem has to have occurred before that call. Therefore, errno was set to ENOTTY before you called getpwnam().

I thought there could be issue with patch so tried in another box where it worked
as expected. So problem is resolved. But I need to find out what was the problem
in first box. From man page I suspect issue could be nsswitch.conf also.