Re: Tiny patch for 0.39 req'd for FreeBSD, possibly other OSes?
"Bruce M. Walker" <[email protected]> Mon, 18 Nov 2002 12:55:31 -0500 (EST)
| Newsgroups | gmane.comp.apache.mod-mp3 |
|---|---|
| Message-ID | <[email protected]> |
Quoting Jon disnard <[email protected]>: > > What version of the code is that? 0.39 (latest released AFAICT). > On FreeBSD, the Makefile from ports/www/mod_mp3/Makefile claims to use > version .39. That version is known to compile for me on freebsd -stable Yup, agreed, it compiles fine. But "apachectl configtest" reports: [...] Cannot create Shared Memory [...] > What version of Apache, 1.3.27? Nah, 1.3.14. But regardless, from the FreeBSD manpages for shmget() you will see that key is supposed to be one of: IPC_PRIVATE, an integer, or the return from ftok(). IPC_CREAT is supposed to be used only in "flag", the 3rd arg to shmget(). Even the manpage for Redhat 7.3 says something like that (though the text on that page is rather borked). Cheers! > Bruce M. Walker wrote: > > >In mod_mp3.c, the initial value of shmkey is wrong for at least > FreeBSD. It > >needs to be IPC_PRIVATE, else Apache won't start. > > > >Patch attached. > > > > > >(I hope this helps atone for my earlier foot-in-mouth exercise. :-) > > > >-bmw > > > >------------------------------------------------------------------------ > > > >*** mod_mp3.c.orig Mon Nov 18 11:26:53 2002 > >--- mod_mp3.c Mon Nov 18 11:26:42 2002 > >*************** > >*** 6,12 **** > > #include "mod_mp3.h" > > > > /* Setup for our scoreboard */ > >! static key_t shmkey = IPC_CREAT; > > > > extern mp3_dispatch internal; > > #ifdef MYSQL_ENABLED > >--- 6,12 ---- > > #include "mod_mp3.h" > > > > /* Setup for our scoreboard */ > >! static key_t shmkey = IPC_PRIVATE; > > > > extern mp3_dispatch internal; > > #ifdef MYSQL_ENABLED > > > > > > _______________________________________________ > Mod_mp3 mailing list > [email protected] > http://lists.tangent.org/mailman/listinfo/mod_mp3 > -bmw