- for (type = SOCK_STREAM; type <= SOCK_SEQPACKET; type++) {
-#if !TARGET_OS_EMBEDDED
- sprintf(mibvar, "net.local.%s.pcblist64", socktype[type]);
+ for (type = SOCK_STREAM; type <= SOCK_RAW; type++) {
+#if !(TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR)
+ snprintf(mibvar, sizeof(mibvar), "net.local.%s.pcblist64", socktype[type]);