Index: libpthread/pthread/pt-setcancelstate.c =================================================================== RCS file: /cvsroot/hurd/hurd/libpthread/pthread/pt-setcancelstate.c,v retrieving revision 1.1 diff -u -p -r1.1 pt-setcancelstate.c --- libpthread/pthread/pt-setcancelstate.c 10 Oct 2002 23:05:06 -0000 1.1 +++ libpthread/pthread/pt-setcancelstate.c 28 Apr 2009 17:51:08 -0000 @@ -35,7 +35,8 @@ pthread_setcancelstate (int state, int * break; } - *oldstate = p->cancel_state; + if (oldstate) + *oldstate = p->cancel_state; p->cancel_state = state; return 0; Index: libpthread/pthread/pt-setcanceltype.c =================================================================== RCS file: /cvsroot/hurd/hurd/libpthread/pthread/pt-setcanceltype.c,v retrieving revision 1.1 diff -u -p -r1.1 pt-setcanceltype.c --- libpthread/pthread/pt-setcanceltype.c 10 Oct 2002 23:05:06 -0000 1.1 +++ libpthread/pthread/pt-setcanceltype.c 28 Apr 2009 17:51:08 -0000 @@ -35,7 +35,8 @@ pthread_setcanceltype (int type, int *ol break; } - *oldtype = p->cancel_type; + if (oldtype) + *oldtype = p->cancel_type; p->cancel_type = type; return 0;