Using pthread: compile error

Rich Wilson richaw at gmail.com
Mon Jan 12 23:57:09 UTC 2015


I have an application I'm moving from Linux to FreeBSD, and I've
run into a perplexing situation. I get the following error:

In file included from noteData.cc:5:

./notePlay.h:58:5: error: unknown type name 'pthread_mutex_t'; did you mean
'pthread_mutex'?
    pthread_mutex_t mutex_np;

    ^~~~~~~~~~~~~~~

    pthread_mutex

/usr/include/stdio.h:142:9: note: 'pthread_mutex' declared here

        struct pthread_mutex *_fl_mutex;        /* used for MT-safety */

               ^

As far as I can tell, 'man pthread' tells me this should be defined,
and pthread.h (or its includes) doesn't.

What's wrong?

The system I am using is the file

FreeBSD-11.0-CURRENT-arm-armv6-ZEDBOARD-20150111-r276981.img

found at
ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/11.0/

-- 
Rich Wilson


More information about the freebsd-questions mailing list