On Mon, 2002-12-02 at 13:23, Eero af Heurlin wrote: > Hello. > > gcc gives error > ----<snip>------ > gcc -DPACKAGE=\"midgard\" -DVERSION=\"1.4.3-RC-2\" -DHAVE_DLFCN_H=1 > -DHAVE_ZLIB_H=1 -DHAVE_CRYPT_H=1 -DHAVE_ICONV=1 -DHAVE_ERRMSG_H=1 > -DHAVE_MYSQL_H=1 -I. -I. -I.. -DG_LOG_DOMAIN=\"midgard-lib\" > -I/usr/local/include/glib-1.2 -I/usr/local/lib/glib/include > -I/usr/local/mysql/include/mysql -I/usr/local/include -Wall -g -O2 > -Wp,-MD,.deps/midgard.pp -c midgard.c -fPIC -DPIC -o .libs/midgard.lo > midgard.c: In function `mgd_log_debug_default': > midgard.c:63: warning: implicit declaration of function `flock' > midgard.c:63: `LOCK_EX' undeclared (first use in this function) > midgard.c:63: (Each undeclared identifier is reported only once > midgard.c:63: for each function it appears in.) > midgard.c:110: `LOCK_UN' undeclared (first use in this function) > midgard.c: In function `mgd_parse_log_levels': > midgard.c:126: warning: subscript has type `char' > midgard.c:145: warning: subscript has type `char' > gmake[1]: *** [midgard.lo] Error 1 > ----<snip>------
looks like you are missing the flock declaration. in Linux it is
declared in <sys/file.h>, it may be in a different header file on
Solaris 9. Try to find it and include that header file.
grtz,
armand@squirrel:~$ man flock
Reformatting flock(2), please wait...
FLOCK(2) Linux Programmer's
Manual FLOCK(2)
NAME
flock - apply or remove an advisory lock on an open file
SYNOPSIS
#include <sys/file.h>
int flock(int fd, int operation)
DESCRIPTION
Apply or remove an advisory lock on an open file. The file is
specified by fd.
Valid operations are given below:
LOCK_SH Shared lock. More than one process may hold a
shared lock for a
given file at a given time.
LOCK_EX Exclusive lock. Only one process may hold an
exclusive lock for
a given file at a given time.
LOCK_UN Unlock.
LOCK_NB Don't block when locking. May be specified
(by or'ing) along
with one of the other operations.
A single file may not simultaneously have both shared and
exclusive locks.
--
Envida http://www.envida.net/
Armand A. Verstappen Graadt van Roggenweg 328
[EMAIL PROTECTED] 3531 AH Utrecht
tel: +31 (0)30 298 2255 Postbus 19127
fax: +31 (0)30 298 2111 3501 DC Utrecht
signature.asc
Description: This is a digitally signed message part
