[icecast-dev] [patch] ices CVS tree and potential problems compiling on Solaris

David Flynn davidf at woaf.net
Thu May 8 13:54:42 PDT 2003



Hello icecast-dev,

this patch against the current ices module CVS tree fixes the following:

PROBLEM:
  use of #include "thread.h" in (of all things) im_sun.[ch] can
  cause a compile error.

REPRODUCTION:
  Compile source tree on Solaris 2.8 using gcc3.2.3 (SMCgcc)
  from sunfreeware.com will fail with a name space collision, eg:
     thread/thread.h:66: conflicting types for `mutex_t'
      /usr/include/synch.h:51: previous declaration of `mutex_t'

REASON:
  Solaris has its own threading library (threads) as well as POSIX (pthreads)
  to use the pthread library one must include /usr/include/pthread.h, to use
  solaris threads one must include /usr/include/thread.h (and
  /usr/include/sched.h) due to im_sun.[ch] including "thread.h" rather than
  "thread/thread.h" without thread/ being in the include search path, gcc
  resorts to the system thread.h.

FIX:
  correct #include "thread.h" to #include "thread/thread.h"

<p>also changed in this patch:
 - removal of #include <pthread.h> from stream.c for it is redundant
 - formatting of <thread/thread.h> to "thread/thread.h"

Enjoy!

--david
--- >8 ----
List archives:  http://www.xiph.org/archives/
icecast project homepage: http://www.icecast.org/
To unsubscribe from this list, send a message to 'icecast-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Icecast-dev mailing list