Initialize socket API before trying to create pipe. Fixes bug
@@ -835,6 +835,7 @@ int nsa_ioctl(int fd, int request, const void* argp)
/* ###### NEAT pipe() implementation ##################################### */
int nsa_pipe(int fds[2])
{
+ if(nsa_initialize() != NULL) {
int sysFDs[2];
if(pipe((int*)&sysFDs) == 0) {
pthread_mutex_lock(&gSocketAPIInternals->nsi_socket_set_mutex);
@@ -853,5 +854,9 @@ int nsa_pipe(int fds[2])
close(sysFDs[1]);
pthread_mutex_unlock(&gSocketAPIInternals->nsi_socket_set_mutex);
}
+ }
+ else {
+ errno = ENXIO;
+ }
return(-1);
}
