@@ -2245,6 +2245,7 @@ private static byte[] getpwuid(int uid) throws Exception {
2245
2245
int res = 0 ;
2246
2246
2247
2247
// errno = 0;
2248
+ Errno .set_errno (0 );
2248
2249
// #ifdef __solaris__
2249
2250
// RESTARTABLE_RETURN_PTR(getpwuid_r((uid_t)uid, &pwent, pwbuf, (Unsigned)buflen),
2250
2251
// p);
@@ -2291,6 +2292,7 @@ private static byte[] getgrgid(int gid) throws Exception {
2291
2292
}
2292
2293
2293
2294
// errno = 0;
2295
+ Errno .set_errno (0 );
2294
2296
// #ifdef __solaris__
2295
2297
// RESTARTABLE_RETURN_PTR(getgrgid_r((gid_t)gid, &grent, grbuf, (Unsigned)buflen),
2296
2298
// g);
@@ -2343,6 +2345,7 @@ private static int getpwnam0(long nameAddress) throws Exception {
2343
2345
CCharPointer name = WordFactory .pointer (nameAddress );
2344
2346
2345
2347
// errno = 0;
2348
+ Errno .set_errno (0 );
2346
2349
// #ifdef __solaris__
2347
2350
// RESTARTABLE_RETURN_PTR(getpwnam_r(name, &pwent, pwbuf, (Unsigned)buflen), p);
2348
2351
// #else
@@ -2391,6 +2394,7 @@ private static int getgrnam0(long nameAddress) throws Exception {
2391
2394
}
2392
2395
2393
2396
// errno = 0;
2397
+ Errno .set_errno (0 );
2394
2398
// #ifdef __solaris__
2395
2399
// RESTARTABLE_RETURN_PTR(getgrnam_r(name, &grent, grbuf, (Unsigned)buflen), g);
2396
2400
// #else
@@ -3141,7 +3145,7 @@ static int checkConnect(FileDescriptor fdo, boolean block, boolean ready) throws
3141
3145
// 073 if (poller.revents) {
3142
3146
if (CTypeConversion .toBoolean (poller .revents ())) {
3143
3147
// 074 errno = 0;
3144
- error_Pointer . write (0 );
3148
+ Errno . set_errno (0 );
3145
3149
// 075 result = getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &n);
3146
3150
result = Socket .getsockopt (fd , Socket .SOL_SOCKET (), Socket .SO_ERROR (), error_Pointer , n_Pointer );
3147
3151
// 076 if (result < 0) {
0 commit comments