diff --git a/configure.in b/configure.in index fb510df3..bc1b4232 100644 --- a/configure.in +++ b/configure.in @@ -17,9 +17,9 @@ if test -z "$GCC"; then PROFILE="-p -g3 -O2 -signed" ;; sparc-sun-solaris*) - DEBUG="-v -g" - CFLAGS="-xO4 -fast -w -fsimple -native -xcg92" - PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc" + DEBUG="-v -g -D_REENTRANT" + CFLAGS="-xO4 -fast -w -fsimple -native -xcg92 -D_REENTRANT" + PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc -D_REENTRANT" ;; *) DEBUG="-g" @@ -35,9 +35,9 @@ else PROFILE="-Wall -W -pg -g -O20 -ffast-math -fsigned-char -D_REENTRANT -D_GNU_SOURCE" ;; sparc-sun-*) - DEBUG="-g -Wall -fsigned-char -mv8" - CFLAGS="-O20 -ffast-math -fsigned-char -mv8" - PROFILE="-pg -g -O20 -fsigned-char -mv8" + DEBUG="-g -Wall -fsigned-char -mv8 -D_REENTRANT" + CFLAGS="-O20 -ffast-math -fsigned-char -mv8 -D_REENTRANT" + PROFILE="-pg -g -O20 -fsigned-char -mv8 -D_REENTRANT" ;; *) DEBUG="-g -Wall -fsigned-char" diff --git a/src/source.c b/src/source.c index c631da73..fe5e4013 100644 --- a/src/source.c +++ b/src/source.c @@ -190,7 +190,7 @@ void *source_main(void *arg) client->con->error = 1; } else { printf("SOURCE: client had recoverable error...\n"); - client->pos += sbytes; + client->pos += sbytes>0?sbytes:0; /* put the refbuf back on top of the queue, since we didn't finish with it */ refbuf_queue_insert(&client->queue, abuf); } @@ -220,7 +220,7 @@ void *source_main(void *arg) client->con->error = 1; } else { printf("SOURCE: recoverable error %ld\n", bytes); - client->pos = sbytes; + client->pos = sbytes>0?sbytes:0; refbuf_addref(refbuf); refbuf_queue_insert(&client->queue, refbuf); }