]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/ikiwiki_cgi_fails_to_build_on_Solaris_due_to_missing_LOCK__95__EX.mdwn
Propose a URL directive for robust relative URLs
[ikiwiki.git] / doc / bugs / ikiwiki_cgi_fails_to_build_on_Solaris_due_to_missing_LOCK__95__EX.mdwn
1 when enabling the cgi wrapper I get,
2
3
4 generating wrappers..
5 "/var/www/cgi-bin/ikiwiki.cgi.c", line 91: warning: implicit function declaration: flock
6 "/var/www/cgi-bin/ikiwiki.cgi.c", line 91: undefined symbol: LOCK_EX
7 cc: acomp failed for /var/www/cgi-bin/ikiwiki.cgi.c
8 failed to compile /var/www/cgi-bin/ikiwiki.cgi.c
9
10
11  cc -V
12 cc: Sun C 5.9 SunOS_i386 Patch 124868-01 2007/07/12
13
14
15 I don't know enough C to provide a patch, but from googling it, people seem to be suggesting fcntl has an alternative.
16
17
18 -----
19
20
21 changing
22
23     if (lockfd != -1 && flock(lockfd, LOCK_EX) == 0) {
24    
25
26 to read
27
28     if (lockfd != -1 && lockf(lockfd, F_LOCK,0) == 0) {
29
30
31 in IkiWiki/Wrapper.pm  lets it compile, according to
32 http://man-wiki.net/index.php/3:lockf "On  Linux, this call is just an
33 interface for fcntl(2)"  does this seem like a sensible fix?a
34
35 > Don't see why not. flock was used only because it's being used
36 > in the same file for testing some other locks.
37
38 > While lockf's fcntl locks are not inherited across a fork,
39 > that doesn't matter for this lock, which is only used to
40 > prevent more than one ikiwiki perl process being run at a time.
41 > Nor is there any need to be compatible with some other user of this
42 > lock; it's only checked in one place. [[applied|done]]
43 > --[[Joey]]