diff --git a/tests/http/clients/ws-data.c b/tests/http/clients/ws-data.c index 6698326dfb..4a3be67bf2 100644 --- a/tests/http/clients/ws-data.c +++ b/tests/http/clients/ws-data.c @@ -103,6 +103,9 @@ static CURLcode send_binary(CURL *curl, char *buf, size_t buflen) return result; } +#if defined(__TANDEM) +# include +#endif static CURLcode recv_binary(CURL *curl, char *exp_data, size_t exp_len) { const struct curl_ws_frame *frame; @@ -118,6 +121,13 @@ static CURLcode recv_binary(CURL *curl, char *exp_data, size_t exp_len) fprintf(stderr, "EAGAIN, sleep, try again\n"); #ifdef _WIN32 Sleep(100); +#elif defined(__TANDEM) + /* NonStop only defines usleep when building for a threading model */ +# if defined(_PUT_MODEL_) || defined(_KLT_MODEL_) + usleep(100*1000); +# else + PROCESS_DELAY_(100*1000); +# endif #else usleep(100*1000); #endif diff --git a/tests/http/clients/ws-pingpong.c b/tests/http/clients/ws-pingpong.c index efb01bcd71..f11d217f47 100644 --- a/tests/http/clients/ws-pingpong.c +++ b/tests/http/clients/ws-pingpong.c @@ -94,6 +94,9 @@ static void websocket_close(CURL *curl) "ws: curl_ws_send returned %u, sent %u\n", (int)result, (int)sent); } +#if defined(__TANDEM) +# include +#endif static CURLcode pingpong(CURL *curl, const char *payload) { CURLcode res; @@ -108,6 +111,13 @@ static CURLcode pingpong(CURL *curl, const char *payload) if(res == CURLE_AGAIN) { #ifdef _WIN32 Sleep(100); +#elif defined(__TANDEM) + /* NonStop only defines usleep when building for a threading model */ +# if defined(_PUT_MODEL_) || defined(_KLT_MODEL_) + usleep(100*1000); +# else + PROCESS_DELAY_(100*1000); +# endif #else usleep(100*1000); #endif