author | simon <simon> | 2002-04-30 06:23:23 (UTC) |
---|---|---|
committer | simon <simon> | 2002-04-30 06:23:23 (UTC) |
commit | 702c4b745d42d9ad5fdcede0a40d85ea1b0577a6 (patch) (side-by-side diff) | |
tree | fbe3d9080bd8e8c851464bf2b3e2c5c3c2383c97 | |
parent | 06be684b1ad4f17fdb5e9ea55560c1d6e4b4bf7d (diff) | |
download | opie-702c4b745d42d9ad5fdcede0a40d85ea1b0577a6.zip opie-702c4b745d42d9ad5fdcede0a40d85ea1b0577a6.tar.gz opie-702c4b745d42d9ad5fdcede0a40d85ea1b0577a6.tar.bz2 |
- read(2) and write(2) are not part of the std namespace
-rw-r--r-- | core/multimedia/opieplayer/libmad/libmadplugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/multimedia/opieplayer/libmad/libmadplugin.cpp b/core/multimedia/opieplayer/libmad/libmadplugin.cpp index 319e0ff..eda5859 100644 --- a/core/multimedia/opieplayer/libmad/libmadplugin.cpp +++ b/core/multimedia/opieplayer/libmad/libmadplugin.cpp @@ -284,25 +284,25 @@ int LibMadPlugin::tcp_open(char *address, int port) { /** * Read a http line header. * This function read character by character. * @param tcp_sock the socket use to read the stream * @param buf a buffer to receive the data * @param size size of the buffer * @return the size of the stream read or -1 if an error occured */ int LibMadPlugin::http_read_line(int tcp_sock, char *buf, int size) { int offset = 0; do { - if (std::read(tcp_sock, buf + offset, 1) < 0) + if (::read(tcp_sock, buf + offset, 1) < 0) return -1; if (buf[offset] != '\r') /* Strip \r from answer */ offset++; } while (offset < size - 1 && buf[offset - 1] != '\n'); buf[offset] = 0; return offset; } int LibMadPlugin::http_open(const QString& path ) { char *host; int port; @@ -376,25 +376,25 @@ int LibMadPlugin::http_open(const QString& path ) { int len; len = http_read_line(tcp_sock, http_request, sizeof(http_request)); if (len == -1) { qDebug( "http_open: "+ QString(strerror(errno)) +"\n"); return 0; } if (QString(http_request).left(9) == "Location:") { /* redirect */ - std::close(tcp_sock); + ::close(tcp_sock); http_request[strlen(http_request) - 1] = '\0'; return http_open(&http_request[10]); } if (QString(http_request).left(4) == "ICY ") { /* This is shoutcast/icecast streaming */ if (strncmp(http_request + 4, "200 ", 4)) { qDebug("http_open: " + QString(http_request) + "\n"); return 0; } } else if (QString(http_request).left(4) == "icy-") { /* we can have: icy-noticeX, icy-name, icy-genre, icy-url, icy-pub, icy-metaint, icy-br */ |